AP_Notify: fixed internal toshiba LED

we need to probe for both internal and external on all boards, not just
FMUv3
This commit is contained in:
Andrew Tridgell 2017-10-07 12:34:47 +11:00
parent 0300f86913
commit f00f650f4f
1 changed files with 8 additions and 0 deletions

View File

@ -123,12 +123,14 @@ void AP_Notify::add_backends(void)
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_PX4_V4 // Has its own LED board
ADD_BACKEND(new PixRacerLED());
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL));
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_INTERNAL));
ADD_BACKEND(new ToneAlarm_PX4());
ADD_BACKEND(new Display());
#else // All other px4 boards use standard devices.
ADD_BACKEND(new AP_BoardLED());
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL));
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_INTERNAL));
ADD_BACKEND(new ToneAlarm_PX4());
ADD_BACKEND(new Display());
#endif
@ -138,11 +140,13 @@ void AP_Notify::add_backends(void)
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_VRBRAIN_V45 // Uses px4 LED board
ADD_BACKEND(new AP_BoardLED());
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL));
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_INTERNAL));
ADD_BACKEND(new ToneAlarm_PX4());
ADD_BACKEND(new ExternalLED());
#else
ADD_BACKEND(new VRBoard_LED());
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL));
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_INTERNAL));
ADD_BACKEND(new ToneAlarm_PX4());
ADD_BACKEND(new ExternalLED());
#endif
@ -152,10 +156,12 @@ void AP_Notify::add_backends(void)
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO
ADD_BACKEND(new NavioLED_I2C());
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL));
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_INTERNAL));
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2
ADD_BACKEND(new DiscreteRGBLed(4, 27, 6, false));
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL));
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_INTERNAL));
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BBBMINI
ADD_BACKEND(new AP_BoardLED());
@ -184,12 +190,14 @@ void AP_Notify::add_backends(void)
#else // other linux
ADD_BACKEND(new AP_BoardLED());
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL));
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_INTERNAL));
ADD_BACKEND(new ToneAlarm_Linux());
#endif
#else
ADD_BACKEND(new AP_BoardLED());
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_EXTERNAL));
ADD_BACKEND(new ToshibaLED_I2C(TOSHIBA_LED_I2C_BUS_INTERNAL));
#endif
}