AP_FlashIface: fix examples

This commit is contained in:
Peter Barker 2022-08-19 11:56:22 +10:00 committed by Peter Barker
parent 668ec44968
commit 8a035590cd
1 changed files with 19 additions and 0 deletions

View File

@ -1,4 +1,20 @@
#include <AP_HAL/AP_HAL.h>
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
void setup() { }
void loop()
{
// the library simply panics if a JEDEC device can't be found. We
// can't really recover from that.
hal.console->printf("No JEDEC on linux\n");
hal.scheduler->delay(1000);
}
#else
#include <GCS_MAVLink/GCS_Dummy.h>
#include <AP_Vehicle/AP_Vehicle.h>
#include <AP_SerialManager/AP_SerialManager.h>
@ -184,4 +200,7 @@ void loop()
hal.scheduler->delay(1000);
}
#endif
AP_HAL_MAIN();