diff --git a/libraries/AP_HAL_ChibiOS/hwdef/include/skyviper.inc b/libraries/AP_HAL_ChibiOS/hwdef/include/skyviper.inc new file mode 100644 index 0000000000000..ce71694dfc776 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/include/skyviper.inc @@ -0,0 +1,4 @@ +# include file for SkyViper boards. Move things in from +# skyviper-v2450/hwdef.dat as required. + +define AP_AIRSPEED_ENABLED 0 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/skyviper-journey/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/skyviper-journey/hwdef.dat index 5a3282bd63e63..a6711bd7eafb2 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/skyviper-journey/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/skyviper-journey/hwdef.dat @@ -134,6 +134,7 @@ env BUILD_ABIN True define AP_PARAM_MAX_EMBEDDED_PARAM 8192 # Disable un-needed hardware drivers +include ../include/skyviper.inc define HAL_WITH_ESC_TELEM 0 define AP_FETTEC_ONEWIRE_ENABLED 0 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/hwdef.dat index 88a6bf4711a66..9f110769cb3bc 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/skyviper-v2450/hwdef.dat @@ -68,6 +68,7 @@ STORAGE_FLASH_PAGE 22 env BUILD_ABIN True # Disable un-needed hardware drivers +include ../include/skyviper.inc define AP_AIRSPEED_ENABLED 0 define AP_BEACON_ENABLED 0 define AP_OPTICALFLOW_ENABLED 0 diff --git a/libraries/AP_Radio/AP_Radio_cc2500.cpp b/libraries/AP_Radio/AP_Radio_cc2500.cpp index fd6fc0a676e43..34ef0eef3041d 100644 --- a/libraries/AP_Radio/AP_Radio_cc2500.cpp +++ b/libraries/AP_Radio/AP_Radio_cc2500.cpp @@ -3,13 +3,14 @@ Many thanks to the cleanflight and betaflight projects */ +#include "AP_Radio_config.h" + +#if AP_RADIO_CC2500_ENABLED + #include // #pragma GCC optimize("O0") -#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS -#if HAL_RCINPUT_WITH_AP_RADIO - #include #include "AP_Radio_cc2500.h" #include @@ -1563,5 +1564,4 @@ void AP_Radio_cc2500::check_double_bind(void) radio_singleton->nextChannel(1); } -#endif // HAL_RCINPUT_WITH_AP_RADIO -#endif // CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS +#endif // AP_RADIO_CC2500_ENABLED