Skip to content

Commit

Permalink
AP_Notify: example: do not instantiate AP_BoardLED unless the board s…
Browse files Browse the repository at this point in the history
…upports it
  • Loading branch information
peterbarker committed Jul 10, 2024
1 parent 71332dd commit f4f7990
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,19 @@ void loop();

const AP_HAL::HAL& hal = AP_HAL::get_HAL();

#if AP_NOTIFY_GPIO_LED_3_ENABLED
// create board led object
AP_BoardLED board_led;
#endif

void setup()
{
hal.console->printf("AP_Notify library test\n");

#if AP_NOTIFY_GPIO_LED_3_ENABLED
// initialise the board leds
board_led.init();
#endif

// turn on initialising notification
AP_Notify::flags.initialising = true;
Expand Down

0 comments on commit f4f7990

Please sign in to comment.