Copter: manual throttle scaling fix

Scaling of bottom half of throttle was changed from THR_MIN ~ 500.
Previously it was from 0 ~ 500.
This commit is contained in:
Randy Mackay 2013-01-31 23:21:18 +09:00 committed by rmackay9
parent a0b65a262b
commit df1c0d92bd
1 changed files with 1 additions and 1 deletions

View File

@ -853,7 +853,7 @@ static int16_t get_pilot_desired_throttle(int16_t throttle_control)
// check throttle is above, below or in the deadband
if (throttle_control < THROTTLE_IN_MIDDLE) {
// below the deadband
throttle_out = (float)throttle_control * (float)g.throttle_mid / 500.0f;
throttle_out = g.throttle_min + ((float)(throttle_control-g.throttle_min))*((float)(g.throttle_mid - g.throttle_min))/((float)(500-g.throttle_min));
}else if(throttle_control > THROTTLE_IN_MIDDLE) {
// above the deadband
throttle_out = g.throttle_mid + ((float)(throttle_control-500))*(float)(1000-g.throttle_mid)/500.0f;