AP_OSD: remove intermediate option_is_enabled methods for RC_Channel

This commit is contained in:
Peter Barker 2023-06-11 15:13:41 +10:00 committed by Randy Mackay
parent 6255ecbfce
commit 53b99dd17a

View File

@ -405,7 +405,7 @@ RC_Channel::AuxSwitchPos AP_OSD_ParamScreen::get_channel_pos(uint8_t rcmapchan)
} }
// switch is reversed if 'reversed' option set on channel and switches reverse is allowed by RC_OPTIONS // switch is reversed if 'reversed' option set on channel and switches reverse is allowed by RC_OPTIONS
bool switch_reversed = chan->get_reverse() && rc().switch_reverse_allowed(); bool switch_reversed = chan->get_reverse() && rc().option_is_enabled(RC_Channels::Option::ALLOW_SWITCH_REV);
if (in < RC_Channel::AUX_PWM_TRIGGER_LOW) { if (in < RC_Channel::AUX_PWM_TRIGGER_LOW) {
return switch_reversed ? RC_Channel::AuxSwitchPos::HIGH : RC_Channel::AuxSwitchPos::LOW; return switch_reversed ? RC_Channel::AuxSwitchPos::HIGH : RC_Channel::AuxSwitchPos::LOW;