Skip to content

Commit

Permalink
AP_GPS: example: do not instantiate AP_BoardLED unless the board supp…
Browse files Browse the repository at this point in the history
…orts it
  • Loading branch information
peterbarker committed Jul 10, 2024
1 parent ab43668 commit 71332dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/AP_GPS/examples/GPS_AUTO_test/GPS_AUTO_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
Expand Down

0 comments on commit 71332dd

Please sign in to comment.