mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 23:05:19 +03:00
change pidloop constraint when dshot bidir is enabled
This commit is contained in:
parent
5b374c6fe0
commit
aa9e8bdbde
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