From 565a84efcb4cf0ba92c47ca0b535dc4ddd347aab Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Tue, 26 Jun 2018 11:30:53 -0700 Subject: [PATCH] AP_Notify: Remove unreachable ChibiOS defines, enable BoardLed --- libraries/AP_Notify/AP_Notify.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/libraries/AP_Notify/AP_Notify.cpp b/libraries/AP_Notify/AP_Notify.cpp index 1ede46a48f..31b9c75e81 100644 --- a/libraries/AP_Notify/AP_Notify.cpp +++ b/libraries/AP_Notify/AP_Notify.cpp @@ -166,8 +166,17 @@ void AP_Notify::add_backends(void) // Notify devices for ChibiOS boards #elif CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS - ADD_BACKEND(new ToneAlarm_ChibiOS()); +# ifdef HAL_HAVE_PIXRACER_LED ADD_BACKEND(new PixRacerLED()); +# else + ADD_BACKEND(new AP_BoardLED()); +# endif +#ifdef HAL_BUZZER_PIN + ADD_BACKEND(new Buzzer()); +#endif +#ifdef HAL_PWM_ALARM + ADD_BACKEND(new ToneAlarm_ChibiOS()); +#endif ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL)); ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_INTERNAL)); ADD_BACKEND(new Display()); @@ -243,18 +252,6 @@ void AP_Notify::add_backends(void) ADD_BACKEND(new ToneAlarm_Linux()); #endif -#elif CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS -# ifdef HAL_HAVE_PIXRACER_LED - ADD_BACKEND(new PixRacerLED()); -# else - ADD_BACKEND(new AP_BoardLED()); -# endif -#ifdef HAL_BUZZER_PIN - ADD_BACKEND(new Buzzer()); -#endif - ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL)); - ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_INTERNAL)); - ADD_BACKEND(new Display()); #elif CONFIG_HAL_BOARD == HAL_BOARD_F4LIGHT ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL)); ADD_BACKEND(new Display());