Skip to content

Commit

Permalink
RC_Channel: add and use AP_BATTERY_ENABLED
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jan 31, 2024
1 parent 84cd51c commit ed03889
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/RC_Channel/RC_Channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ed03889

Please sign in to comment.