AP_Notify: stop using linux board subtype in Notify LED setup

... instead have the board definitions define things like we do for ChibiOS
This commit is contained in:
Peter Barker
2024-07-16 10:11:40 +10:00
committed by Andrew Tridgell
parent 55308e6d79
commit 501d0d8759
10 changed files with 74 additions and 20 deletions
+6 -8
View File
@@ -287,19 +287,17 @@ void AP_Notify::add_backends(void)
break;
case Notify_LED_Board:
// select the most appropriate built in LED driver type
#if CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2
#if AP_NOTIFY_SYSFS_LED_ENABLED
ADD_BACKEND(NEW_NOTHROW Led_Sysfs("rgb_led0", "rgb_led2", "rgb_led1"));
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_EDGE
#elif AP_NOTIFY_RCOUTPUTRGBLEDINVERTED_LED_ENABLED
ADD_BACKEND(NEW_NOTHROW RCOutputRGBLedInverted(12, 13, 14));
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BH
#elif AP_NOTIFY_RCOUTPUTRGBLED_LED_ENABLED
ADD_BACKEND(NEW_NOTHROW RCOutputRGBLed(HAL_RCOUT_RGBLED_RED, HAL_RCOUT_RGBLED_GREEN, HAL_RCOUT_RGBLED_BLUE));
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_DISCO
#elif AP_NOTIFY_DISCO_LED_ENABLED
ADD_BACKEND(NEW_NOTHROW DiscoLED());
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIGATOR
#elif AP_NOTIFY_NAVIGATOR_LED_ENABLED
ADD_BACKEND(NEW_NOTHROW NavigatorLED());
#endif
#endif // CONFIG_HAL_BOARD == HAL_BOARD_LINUX
#endif
#if AP_NOTIFY_EXTERNALLED_ENABLED
ADD_BACKEND(NEW_NOTHROW ExternalLED()); // despite the name this is a built in set of onboard LED's