diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index ce0529c8de..a44b2adcf6 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -325,6 +325,9 @@ RC_Channel::pwm_to_range() int16_t RC_Channel::range_to_pwm() { + if (_high_out == _low_out) { + return radio_trim; + } return ((long)(servo_out - _low_out) * (long)(radio_max - radio_min)) / (long)(_high_out - _low_out); }