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

Prevent resetting motorPwmRate twice for PWM_TYPE_STANDARD

This commit is contained in:
borisbstyle 2017-02-07 01:49:14 +01:00
parent 1ec8adbb5c
commit 2a77107376

View file

@ -1118,7 +1118,7 @@ void validateAndFixGyroConfig(void)
}
// 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);
if(motorConfig()->motorPwmRate > maxEscRate)