AP_MotorsMulticopter: set_throttle_range calcs _min_throttle before use

This commit is contained in:
Leonard Hall 2015-12-20 17:39:08 +10:30 committed by Randy Mackay
parent b26318c178
commit 3fc3858fbd
1 changed files with 1 additions and 1 deletions

View File

@ -370,8 +370,8 @@ void AP_MotorsMulticopter::set_throttle_range(uint16_t min_throttle, int16_t rad
_throttle_radio_min = radio_min;
_throttle_radio_max = radio_max;
_throttle_pwm_scalar = (_throttle_radio_max - _throttle_radio_min) / 1000.0f;
_rpy_pwm_scalar = (_throttle_radio_max - (_throttle_radio_min + _min_throttle)) / 9000.0f;
_min_throttle = (float)min_throttle * _throttle_pwm_scalar;
_rpy_pwm_scalar = (_throttle_radio_max - (_throttle_radio_min + _min_throttle)) / 9000.0f;
}
void AP_MotorsMulticopter::output_logic()