Skip to content

Commit 3f11fe0

Browse files
committed
RC_Channel: Change the valid range of RCIN
1 parent ddccad8 commit 3f11fe0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/RC_Channel/RC_Channel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ bool RC_Channel::read_6pos_switch(int8_t& position)
567567
{
568568
// calculate position of 6 pos switch
569569
const uint16_t pulsewidth = get_radio_in();
570-
if (pulsewidth <= RC_MIN_LIMIT_PWM || pulsewidth >= RC_MAX_LIMIT_PWM) {
570+
if (pulsewidth < RC_MIN_LIMIT_PWM || pulsewidth > RC_MAX_LIMIT_PWM) {
571571
return false; // This is an error condition
572572
}
573573

@@ -1930,7 +1930,7 @@ void RC_Channel::init_aux()
19301930
bool RC_Channel::read_3pos_switch(RC_Channel::AuxSwitchPos &ret) const
19311931
{
19321932
const uint16_t in = get_radio_in();
1933-
if (in <= RC_MIN_LIMIT_PWM || in >= RC_MAX_LIMIT_PWM) {
1933+
if (in < RC_MIN_LIMIT_PWM || in > RC_MAX_LIMIT_PWM) {
19341934
return false;
19351935
}
19361936

0 commit comments

Comments
 (0)