mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Disable use_unsynced_pwm if using DSHOT or PROSHOT (#8486)
Disable use_unsynced_pwm if using DSHOT or PROSHOT
This commit is contained in:
commit
f21745c552
1 changed files with 9 additions and 2 deletions
|
@ -452,7 +452,7 @@ static void validateAndFixConfig(void)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_DSHOT_TELEMETRY)
|
#if defined(USE_DSHOT)
|
||||||
bool usingDshotProtocol;
|
bool usingDshotProtocol;
|
||||||
switch (motorConfig()->dev.motorPwmProtocol) {
|
switch (motorConfig()->dev.motorPwmProtocol) {
|
||||||
case PWM_TYPE_PROSHOT1000:
|
case PWM_TYPE_PROSHOT1000:
|
||||||
|
@ -467,11 +467,18 @@ static void validateAndFixConfig(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If using DSHOT protocol disable unsynched PWM as it's meaningless
|
||||||
|
if (usingDshotProtocol) {
|
||||||
|
motorConfigMutable()->dev.useUnsyncedPwm = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(USE_DSHOT_TELEMETRY)
|
||||||
if ((!usingDshotProtocol || motorConfig()->dev.useBurstDshot || !systemConfig()->schedulerOptimizeRate)
|
if ((!usingDshotProtocol || motorConfig()->dev.useBurstDshot || !systemConfig()->schedulerOptimizeRate)
|
||||||
&& motorConfig()->dev.useDshotTelemetry) {
|
&& motorConfig()->dev.useDshotTelemetry) {
|
||||||
motorConfigMutable()->dev.useDshotTelemetry = false;
|
motorConfigMutable()->dev.useDshotTelemetry = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif // USE_DSHOT_TELEMETRY
|
||||||
|
#endif // USE_DSHOT
|
||||||
|
|
||||||
// Temporary workaround until RPM Filter supports dual-gyro using both sensors
|
// Temporary workaround until RPM Filter supports dual-gyro using both sensors
|
||||||
// Once support is added remove this block
|
// Once support is added remove this block
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue