mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
Brushed motor fix
This commit is contained in:
parent
aebd72a924
commit
ab02e8d956
2 changed files with 1 additions and 1 deletions
|
@ -537,6 +537,7 @@ static void resetConf(void)
|
||||||
#ifdef BRUSHED_MOTORS
|
#ifdef BRUSHED_MOTORS
|
||||||
masterConfig.motor_pwm_rate = BRUSHED_MOTORS_PWM_RATE;
|
masterConfig.motor_pwm_rate = BRUSHED_MOTORS_PWM_RATE;
|
||||||
masterConfig.motor_pwm_protocol = PWM_TYPE_BRUSHED;
|
masterConfig.motor_pwm_protocol = PWM_TYPE_BRUSHED;
|
||||||
|
masterConfig.use_unsyncedPwm = true;
|
||||||
#else
|
#else
|
||||||
masterConfig.motor_pwm_rate = BRUSHLESS_MOTORS_PWM_RATE;
|
masterConfig.motor_pwm_rate = BRUSHLESS_MOTORS_PWM_RATE;
|
||||||
masterConfig.motor_pwm_protocol = PWM_TYPE_ONESHOT125;
|
masterConfig.motor_pwm_protocol = PWM_TYPE_ONESHOT125;
|
||||||
|
|
|
@ -323,7 +323,6 @@ void init(void)
|
||||||
if (masterConfig.motor_pwm_protocol == PWM_TYPE_BRUSHED) {
|
if (masterConfig.motor_pwm_protocol == PWM_TYPE_BRUSHED) {
|
||||||
featureClear(FEATURE_3D);
|
featureClear(FEATURE_3D);
|
||||||
pwm_params.idlePulse = 0; // brushed motors
|
pwm_params.idlePulse = 0; // brushed motors
|
||||||
use_unsyncedPwm = false;
|
|
||||||
}
|
}
|
||||||
#ifdef CC3D
|
#ifdef CC3D
|
||||||
pwm_params.useBuzzerP6 = masterConfig.use_buzzer_p6 ? true : false;
|
pwm_params.useBuzzerP6 = masterConfig.use_buzzer_p6 ? true : false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue