diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 2fe902814aa8f..35cbf9577ff3d 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -510,7 +510,9 @@ void RC_Channel::init_aux_function(const aux_func_t ch_option, const AuxSwitchPo case AUX_FUNC::MOUNT2_PITCH: case AUX_FUNC::MOUNT2_YAW: break; +#if HAL_ADSB_ENABLED case AUX_FUNC::AVOID_ADSB: +#endif case AUX_FUNC::AVOID_PROXIMITY: case AUX_FUNC::FENCE: case AUX_FUNC::GPS_DISABLE: @@ -1021,9 +1023,11 @@ bool RC_Channel::do_aux_function(const aux_func_t ch_option, const AuxSwitchPos do_aux_function_mission_reset(ch_flag); break; +#if HAL_ADSB_ENABLED case AUX_FUNC::AVOID_ADSB: do_aux_function_avoid_adsb(ch_flag); break; +#endif case AUX_FUNC::FFT_NOTCH_TUNE: do_aux_function_fft_notch_tune(ch_flag);