diff --git a/src/flight/pid.c b/src/flight/pid.c index 32486525b..e98ffd3f3 100644 --- a/src/flight/pid.c +++ b/src/flight/pid.c @@ -181,8 +181,8 @@ static inline void pid(uint8_t x) { state.pid_p_term.axis[x] *= v_compensation; // I term - if (flags.on_ground || flags.in_air == 0) { - // wind down integral while we are still on ground + if (flags.in_air == 0 && fabsf(state.error.axis[x]) < 0.05f) { + // wind down integral while we are still on ground and we do not get any input from the sticks ierror[x] *= 0.98f; }