use the defined value in both places

This commit is contained in:
ctzsnooze 2018-09-10 16:52:27 +10:00
parent 1217893676
commit acbc041259
1 changed files with 1 additions and 1 deletions

View File

@ -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);