mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Merge pull request #1774 from AlienWiiBF/Brushed_ESC_detect
Generalize brushed ESC auto detection
This commit is contained in:
commit
1f04d7343a
19 changed files with 77 additions and 178 deletions
|
@ -274,9 +274,19 @@ void resetMotorConfig(motorConfig_t *motorConfig)
|
|||
motorConfig->motorPwmProtocol = PWM_TYPE_BRUSHED;
|
||||
motorConfig->useUnsyncedPwm = true;
|
||||
#else
|
||||
motorConfig->minthrottle = 1070;
|
||||
motorConfig->motorPwmRate = BRUSHLESS_MOTORS_PWM_RATE;
|
||||
motorConfig->motorPwmProtocol = PWM_TYPE_ONESHOT125;
|
||||
#ifdef BRUSHED_ESC_AUTODETECT
|
||||
if (hardwareMotorType == MOTOR_BRUSHED) {
|
||||
motorConfig->minthrottle = 1000;
|
||||
motorConfig->motorPwmRate = BRUSHED_MOTORS_PWM_RATE;
|
||||
motorConfig->motorPwmProtocol = PWM_TYPE_BRUSHED;
|
||||
motorConfig->useUnsyncedPwm = true;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
motorConfig->minthrottle = 1070;
|
||||
motorConfig->motorPwmRate = BRUSHLESS_MOTORS_PWM_RATE;
|
||||
motorConfig->motorPwmProtocol = PWM_TYPE_ONESHOT125;
|
||||
}
|
||||
#endif
|
||||
motorConfig->maxthrottle = 2000;
|
||||
motorConfig->mincommand = 1000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue