mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 15:25:36 +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 {
|
} else {
|
||||||
const float pidLooptime = samplingTime * pidConfig()->pid_process_denom;
|
const float pidLooptime = samplingTime * pidConfig()->pid_process_denom;
|
||||||
|
if (motorConfig()->dev.useDshotTelemetry) {
|
||||||
|
motorUpdateRestriction *= 2;
|
||||||
|
}
|
||||||
if (pidLooptime < motorUpdateRestriction) {
|
if (pidLooptime < motorUpdateRestriction) {
|
||||||
uint8_t minPidProcessDenom = motorUpdateRestriction / samplingTime;
|
uint8_t minPidProcessDenom = motorUpdateRestriction / samplingTime;
|
||||||
if (motorUpdateRestriction / samplingTime > minPidProcessDenom) {
|
if (motorUpdateRestriction / samplingTime > minPidProcessDenom) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue