AP_MotorsHeli_Single: Fix recalc_scalars function

This commit is contained in:
Robert Lefebvre 2015-08-07 20:54:44 -04:00 committed by Randy Mackay
parent 214d60abb9
commit c3e7eed299
1 changed files with 4 additions and 4 deletions

View File

@ -220,10 +220,10 @@ void AP_MotorsHeli_Single::set_desired_rotor_speed(int16_t desired_speed)
// recalc_scalers - recalculates various scalers used. Should be called at about 1hz to allow users to see effect of changing parameters
void AP_MotorsHeli_Single::recalc_scalers()
{
if (_rsc_mode != AP_MOTORS_HELI_RSC_MODE_SETPOINT) {
_tail_rotor.set_ramp_time(0);
_tail_rotor.set_runup_time(0);
_tail_rotor.set_critical_speed(0);
if (_rsc_mode == AP_MOTORS_HELI_RSC_MODE_NONE) {
_main_rotor.set_ramp_time(0);
_main_rotor.set_runup_time(0);
_main_rotor.set_critical_speed(0);
} else {
_main_rotor.set_ramp_time(_rsc_ramp_time);
_main_rotor.set_runup_time(_rsc_runup_time);