From 5ae3c60e8b2fa19c97a0b18bdd557a31d9a624eb Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 3 Sep 2018 09:49:28 +1000 Subject: [PATCH] AP_Notify: fix nullptr in ToshibaLED example --- .../AP_Notify/examples/ToshibaLED_test/ToshibaLED_test.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_Notify/examples/ToshibaLED_test/ToshibaLED_test.cpp b/libraries/AP_Notify/examples/ToshibaLED_test/ToshibaLED_test.cpp index ccd196bf1b..6c94bdbe48 100644 --- a/libraries/AP_Notify/examples/ToshibaLED_test/ToshibaLED_test.cpp +++ b/libraries/AP_Notify/examples/ToshibaLED_test/ToshibaLED_test.cpp @@ -9,6 +9,8 @@ void blink(); const AP_HAL::HAL& hal = AP_HAL::get_HAL(); +AP_Notify notify; + static ToshibaLED_I2C toshiba_led(1); void setup(void) @@ -20,6 +22,7 @@ void setup(void) if (toshiba_led.init()) { hal.console->printf("Failed to initialise Toshiba LED\n"); } + toshiba_led.pNotify = ¬ify; // turn on initialising notification AP_Notify::flags.initialising = false;