diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 40a0072462..7aedba4481 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -122,14 +122,12 @@ RC_Channel::set_pwm(int16_t pwm) } } -// read input from APM_RC - create a control_in value, but use a -// zero value for the dead zone. When done this way the control_in -// value can be used as servo_out to give the same output as input +// recompute control values with no deadzone +// When done this way the control_in value can be used as servo_out +// to give the same output as input void -RC_Channel::set_pwm_no_deadzone(int16_t pwm) +RC_Channel::recompute_pwm_no_deadzone() { - radio_in = pwm; - if (type_in == RC_CHANNEL_TYPE_RANGE) { control_in = pwm_to_range_dz(0); } else { diff --git a/libraries/RC_Channel/RC_Channel.h b/libraries/RC_Channel/RC_Channel.h index 470f4a50e6..1c9202b666 100644 --- a/libraries/RC_Channel/RC_Channel.h +++ b/libraries/RC_Channel/RC_Channel.h @@ -43,7 +43,7 @@ public: // read input from hal.rcin - create a control_in value void set_pwm(int16_t pwm); - void set_pwm_no_deadzone(int16_t pwm); + void recompute_pwm_no_deadzone(); // calculate an angle given dead_zone and trim. This is used by the quadplane code // for hover throttle