diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 296afb878b..ef80a7ab84 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -1319,11 +1319,13 @@ bool RC_Channel::do_aux_function(const aux_func_t ch_option, const AuxSwitchPos break; #endif +#if AP_BATTERY_ENABLED case AUX_FUNC::BATTERY_MPPT_ENABLE: if (ch_flag != AuxSwitchPos::MIDDLE) { AP::battery().MPPT_set_powered_state_to_all(ch_flag == AuxSwitchPos::HIGH); } break; +#endif #if HAL_SPRAYER_ENABLED case AUX_FUNC::SPRAYER: