1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

FastPWM as part of Oneshot125 (dynamic oneshot)

bool correction

IdlePulse
This commit is contained in:
borisbstyle 2015-10-01 16:38:37 +02:00
parent 77534ed6f6
commit fa9cd0440b
7 changed files with 16 additions and 20 deletions

View file

@ -256,12 +256,12 @@ void init(void)
#endif
pwm_params.useOneshot = feature(FEATURE_ONESHOT125);
pwm_params.useFastPWM = feature(FEATURE_FASTPWM);
pwm_params.useFastPWM = masterConfig.use_fast_pwm ? true : false;
pwm_params.motorPwmRate = masterConfig.motor_pwm_rate;
pwm_params.idlePulse = masterConfig.escAndServoConfig.mincommand;
if (feature(FEATURE_3D))
pwm_params.idlePulse = masterConfig.flight3DConfig.neutral3d;
if (pwm_params.motorPwmRate > 500)
if (pwm_params.motorPwmRate > 500 && !masterConfig.use_fast_pwm)
pwm_params.idlePulse = 0; // brushed motors
pwmRxInit(masterConfig.inputFilteringMode);