mirror of https://github.com/ArduPilot/ardupilot
AP_FlashIface: fix examples
This commit is contained in:
parent
668ec44968
commit
8a035590cd
|
@ -1,4 +1,20 @@
|
||||||
#include <AP_HAL/AP_HAL.h>
|
#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 <GCS_MAVLink/GCS_Dummy.h>
|
||||||
#include <AP_Vehicle/AP_Vehicle.h>
|
#include <AP_Vehicle/AP_Vehicle.h>
|
||||||
#include <AP_SerialManager/AP_SerialManager.h>
|
#include <AP_SerialManager/AP_SerialManager.h>
|
||||||
|
@ -184,4 +200,7 @@ void loop()
|
||||||
hal.scheduler->delay(1000);
|
hal.scheduler->delay(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
AP_HAL_MAIN();
|
AP_HAL_MAIN();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue