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