mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
correct drift
This commit is contained in:
parent
8fe07af613
commit
bb71b6ec64
1 changed files with 1 additions and 1 deletions
|
@ -783,7 +783,7 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, const rollAndPitchT
|
|||
const float gmax = MAX(gyroTargetHigh, gyroTargetLow);
|
||||
const float gmin = MIN(gyroTargetHigh, gyroTargetLow);
|
||||
if (gyroRate >= gmin && gyroRate <= gmax) {
|
||||
itermErrorRate = 0.0f;
|
||||
itermErrorRate = acCorrection;
|
||||
} else {
|
||||
itermErrorRate = (gyroRate > gmax ? gmax : gmin ) - gyroRate;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue