From 0bbcbc862469b002b0af68614a2566e9bc511237 Mon Sep 17 00:00:00 2001 From: LukeMike Date: Mon, 14 Jan 2019 11:52:46 +0100 Subject: [PATCH] AP_Notify: added ExternalLED and VRBoard_LED for ChibiOS VR Brain boards --- libraries/AP_Notify/AP_Notify.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/AP_Notify/AP_Notify.cpp b/libraries/AP_Notify/AP_Notify.cpp index 76f872c3d3..712d9c7869 100644 --- a/libraries/AP_Notify/AP_Notify.cpp +++ b/libraries/AP_Notify/AP_Notify.cpp @@ -212,17 +212,17 @@ void AP_Notify::add_backends(void) #endif #endif // CONFIG_HAL_BOARD == HAL_BOARD_LINUX -#if CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN - ADD_BACKEND(new AP_ExternalLED()); // despite the name this is a built in set of onboard LED's +#if CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_VRBRAIN_V52 || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_VRUBRAIN_V51 + ADD_BACKEND(new ExternalLED()); // despite the name this is a built in set of onboard LED's #endif // CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN #if defined(HAL_HAVE_PIXRACER_LED) ADD_BACKEND(new PixRacerLED()); #elif (defined(HAL_GPIO_A_LED_PIN) && defined(HAL_GPIO_B_LED_PIN) && defined(HAL_GPIO_C_LED_PIN)) - #if CONFIG_HAL_BOARD != HAL_BOARD_VRBRAIN || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_VRBRAIN_V45 - ADD_BACKEND(new AP_BoardLED()); - #else + #if (CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN && CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_VRBRAIN_V45) || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_VRBRAIN_V52 || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_VRUBRAIN_V51 ADD_BACKEND(new VRBoard_LED()); + #else + ADD_BACKEND(new AP_BoardLED()); #endif // CONFIG_HAL_BOARD != HAL_BOARD_VRBRAIN || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_VRBRAIN_V45 #elif (defined(HAL_GPIO_A_LED_PIN) && defined(HAL_GPIO_B_LED_PIN)) ADD_BACKEND(new AP_BoardLED2());