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

@ -161,7 +161,7 @@ static void resetPidProfile(pidProfile_t *pidProfile)
pidProfile->D8[PITCH] = 15;
pidProfile->P8[YAW] = 90;
pidProfile->I8[YAW] = 45;
pidProfile->D8[YAW] = 10;
pidProfile->D8[YAW] = 20;
pidProfile->P8[PIDALT] = 50;
pidProfile->I8[PIDALT] = 0;
pidProfile->D8[PIDALT] = 0;
@ -184,7 +184,7 @@ static void resetPidProfile(pidProfile_t *pidProfile)
pidProfile->yaw_p_limit = YAW_P_LIMIT_MAX;
pidProfile->yaw_lpf_hz = 80;
pidProfile->rollPitchItermIgnoreRate = 180;
pidProfile->rollPitchItermIgnoreRate = 900;
pidProfile->yawItermIgnoreRate = 35;
pidProfile->dterm_lpf_hz = 110; // filtering ON by default
pidProfile->dynamic_pid = 1;

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