From d44abb23bf6699645020ad5e312e4573fd092d6e Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Tue, 14 Jan 2025 18:49:24 +0000 Subject: [PATCH] Update libraries/RC_Channel/RC_Channel.cpp Co-authored-by: Peter Hall <33176108+IamPete1@users.noreply.github.com> --- libraries/RC_Channel/RC_Channel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 3c6bc11b4e7ad4..63b26ea559de10 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -1967,11 +1967,11 @@ RC_Channel::AuxSwitchPos RC_Channel::get_stick_gesture_pos() const if (in < RC_Channel::AUX_PWM_TRIGGER_LOW) { return switch_reversed ? RC_Channel::AuxSwitchPos::HIGH : RC_Channel::AuxSwitchPos::LOW; - } else if (in > RC_Channel::AUX_PWM_TRIGGER_HIGH) { + } + if (in > RC_Channel::AUX_PWM_TRIGGER_HIGH) { return switch_reversed ? RC_Channel::AuxSwitchPos::LOW : RC_Channel::AuxSwitchPos::HIGH; - } else { - return RC_Channel::AuxSwitchPos::MIDDLE; - } + } + return RC_Channel::AuxSwitchPos::MIDDLE; } RC_Channel *RC_Channels::find_channel_for_option(const RC_Channel::AUX_FUNC option)