From acbc041259dc0cffc67969e2b70e924ca66f09ff Mon Sep 17 00:00:00 2001 From: ctzsnooze Date: Mon, 10 Sep 2018 16:52:27 +1000 Subject: [PATCH] use the defined value in both places --- src/main/flight/pid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index 6d8d32ddd..0c026f90d 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -920,7 +920,7 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, const rollAndPitchT const bool isDecreasingI = ((ITerm > 0) && (itermErrorRate < 0)) || ((ITerm < 0) && (itermErrorRate > 0)); if ((itermRelax >= ITERM_RELAX_RP_INC) && isDecreasingI) { // Do Nothing, use the precalculed itermErrorRate - } else if (itermRelaxType == ITERM_RELAX_SETPOINT && setpointHpf < 30) { + } else if (itermRelaxType == ITERM_RELAX_SETPOINT && setpointHpf < ITERM_RELAX_SETPOINT_THRESHOLD) { itermErrorRate *= itermRelaxFactor; } else if (itermRelaxType == ITERM_RELAX_GYRO ) { itermErrorRate = fapplyDeadband(setpointLpf - gyroRate, setpointHpf);