Changed idle pulse width from fixed 1ms to that configured.

Stops motors, that have none standard pulse ranges, from running up
after a save or exit from cli.
This commit is contained in:
atomiclama 2015-05-18 12:10:59 +01:00 committed by Dominic Clifton
parent 3037a91b06
commit 713e138c42
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ void init(void)
pwm_params.useOneshot = feature(FEATURE_ONESHOT125); pwm_params.useOneshot = feature(FEATURE_ONESHOT125);
pwm_params.motorPwmRate = masterConfig.motor_pwm_rate; pwm_params.motorPwmRate = masterConfig.motor_pwm_rate;
pwm_params.idlePulse = PULSE_1MS; // standard PWM for brushless ESC (default, overridden below) pwm_params.idlePulse = masterConfig.escAndServoConfig.mincommand;
if (feature(FEATURE_3D)) if (feature(FEATURE_3D))
pwm_params.idlePulse = masterConfig.flight3DConfig.neutral3d; pwm_params.idlePulse = masterConfig.flight3DConfig.neutral3d;
if (pwm_params.motorPwmRate > 500) if (pwm_params.motorPwmRate > 500)