mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
AP_Notify: example: do not instantiate AP_BoardLED unless the board supports it
This commit is contained in:
parent
71332dd039
commit
f4f79905cc
@ -12,15 +12,19 @@ void loop();
|
|||||||
|
|
||||||
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
||||||
|
|
||||||
|
#if AP_NOTIFY_GPIO_LED_3_ENABLED
|
||||||
// create board led object
|
// create board led object
|
||||||
AP_BoardLED board_led;
|
AP_BoardLED board_led;
|
||||||
|
#endif
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
{
|
{
|
||||||
hal.console->printf("AP_Notify library test\n");
|
hal.console->printf("AP_Notify library test\n");
|
||||||
|
|
||||||
|
#if AP_NOTIFY_GPIO_LED_3_ENABLED
|
||||||
// initialise the board leds
|
// initialise the board leds
|
||||||
board_led.init();
|
board_led.init();
|
||||||
|
#endif
|
||||||
|
|
||||||
// turn on initialising notification
|
// turn on initialising notification
|
||||||
AP_Notify::flags.initialising = true;
|
AP_Notify::flags.initialising = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user