mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Prevent resetting motorPwmRate twice for PWM_TYPE_STANDARD
This commit is contained in:
parent
1ec8adbb5c
commit
2a77107376
1 changed files with 1 additions and 1 deletions
|
@ -1118,7 +1118,7 @@ void validateAndFixGyroConfig(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent overriding the max rate of motors
|
// Prevent overriding the max rate of motors
|
||||||
if (motorConfig()->useUnsyncedPwm && (motorConfig()->motorPwmProtocol <= PWM_TYPE_BRUSHED)) {
|
if (motorConfig()->useUnsyncedPwm && (motorConfig()->motorPwmProtocol <= PWM_TYPE_BRUSHED) && motorConfig()->motorPwmProtocol != PWM_TYPE_STANDARD) {
|
||||||
uint32_t maxEscRate = lrintf(1.0f / motorUpdateRestriction);
|
uint32_t maxEscRate = lrintf(1.0f / motorUpdateRestriction);
|
||||||
|
|
||||||
if(motorConfig()->motorPwmRate > maxEscRate)
|
if(motorConfig()->motorPwmRate > maxEscRate)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue