From 71332dd039799e316fb04691e32b68fd7a455a3a Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 9 Jul 2024 20:39:20 +1000 Subject: [PATCH] AP_GPS: example: do not instantiate AP_BoardLED unless the board supports it --- libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp b/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp index 278b0ee3e5..5eb2b45ae6 100644 --- a/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp +++ b/libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp @@ -33,8 +33,10 @@ const AP_HAL::HAL& hal = AP_HAL::get_HAL(); //Declare "hal" static AP_BoardConfig board_config; +#if AP_NOTIFY_GPIO_LED_3_ENABLED // create board led object AP_BoardLED board_led; +#endif // create fake gcs object GCS_Dummy _gcs; //gcs stands for Ground Control Station @@ -61,8 +63,10 @@ void setup() board_config.init(); +#if AP_NOTIFY_GPIO_LED_3_ENABLED // Initialise the leds board_led.init(); +#endif // Initialize the UART for GPS system serial_manager.init();