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