RC_Channel: Rework set_pwm_no_deadzone() to a recompute function

This commit is contained in:
Michael du Breuil 2018-04-10 15:50:16 -07:00 committed by Andrew Tridgell
parent 7b7f5e242b
commit c8fdb90ab5
2 changed files with 5 additions and 7 deletions

View File

@ -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 {

View File

@ -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