From f4f79905cca05193f878652fe9aaaff8d4d3888a Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 9 Jul 2024 20:39:20 +1000 Subject: [PATCH] AP_Notify: example: do not instantiate AP_BoardLED unless the board supports it --- .../AP_Notify/examples/AP_Notify_test/AP_Notify_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_Notify/examples/AP_Notify_test/AP_Notify_test.cpp b/libraries/AP_Notify/examples/AP_Notify_test/AP_Notify_test.cpp index 6412bd0326..1247dd4287 100644 --- a/libraries/AP_Notify/examples/AP_Notify_test/AP_Notify_test.cpp +++ b/libraries/AP_Notify/examples/AP_Notify_test/AP_Notify_test.cpp @@ -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;