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

change pidloop constraint when dshot bidir is enabled

This commit is contained in:
Nicola De Pasquale 2020-03-26 17:17:22 +01:00
parent 5b374c6fe0
commit aa9e8bdbde

View file

@ -657,6 +657,9 @@ void validateAndFixGyroConfig(void)
}
} else {
const float pidLooptime = samplingTime * pidConfig()->pid_process_denom;
if (motorConfig()->dev.useDshotTelemetry) {
motorUpdateRestriction *= 2;
}
if (pidLooptime < motorUpdateRestriction) {
uint8_t minPidProcessDenom = motorUpdateRestriction / samplingTime;
if (motorUpdateRestriction / samplingTime > minPidProcessDenom) {