mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue