1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 05:15:25 +03:00

Fix Luxfloat iterm issue // New Ignore Iterm default

This commit is contained in:
borisbstyle 2016-05-25 22:43:06 +02:00
parent 4a80a64f43
commit 935ad7f613
2 changed files with 3 additions and 3 deletions

View file

@ -222,7 +222,7 @@ static void pidLuxFloat(const pidProfile_t *pidProfile, const controlRateConfig_
// -----calculate I component.
uint16_t kI = (pidProfile->dynamic_pid) ? getDynamicKi(axis, pidProfile) : pidProfile->I8[axis];
errorGyroIf[axis] = constrainf(kI + luxITermScale * RateError * getdT() * pidProfile->I8[axis], -250.0f, 250.0f);
errorGyroIf[axis] = constrainf(errorGyroIf[axis] + luxITermScale * RateError * getdT() * kI, -250.0f, 250.0f);
// limit maximum integrator value to prevent WindUp - accumulating extreme values when system is saturated.
// I coefficient (I8) moved before integration to make limiting independent from PID settings