Merge pull request #9642 from IllusionFpv/constrain-pidloop-for-bidir
Change pidloop constraint when dshot bidir is enabled
This commit is contained in:
commit
f2ef33cbdd
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue