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

Fixed detection of brushless / brushed motors.

This commit is contained in:
mikeller 2019-03-03 02:42:21 +13:00
parent 29db27584f
commit acf759b82e
11 changed files with 44 additions and 27 deletions

View file

@ -86,7 +86,7 @@ void pgResetFn_motorConfig(motorConfig_t *motorConfig)
motorConfig->dev.useUnsyncedPwm = true;
#else
#ifdef USE_BRUSHED_ESC_AUTODETECT
if (hardwareMotorType == MOTOR_BRUSHED) {
if (getDetectedMotorType() == MOTOR_BRUSHED) {
motorConfig->minthrottle = 1000;
motorConfig->dev.motorPwmRate = BRUSHED_MOTORS_PWM_RATE;
motorConfig->dev.motorPwmProtocol = PWM_TYPE_BRUSHED;