AP_GPS: example: do not instantiate AP_BoardLED unless the board supports it

This commit is contained in:
Peter Barker 2024-07-09 20:39:20 +10:00 committed by Peter Barker
parent ab43668c45
commit 71332dd039
1 changed files with 4 additions and 0 deletions

View File

@ -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();