Browse Source

AP_FlashIface: fix examples

master
Peter Barker 3 years ago committed by Peter Barker
parent
commit
8a035590cd
  1. 19
      libraries/AP_FlashIface/examples/jedec_test/jedec_test.cpp

19
libraries/AP_FlashIface/examples/jedec_test/jedec_test.cpp

@ -1,4 +1,20 @@ @@ -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() @@ -184,4 +200,7 @@ void loop()
hal.scheduler->delay(1000);
}
#endif
AP_HAL_MAIN();

Loading…
Cancel
Save