PidIndustrial does not limit iTerm fix #1599

This commit is contained in:
rusefi 2020-07-11 15:30:40 -04:00
parent 84ebfe301a
commit 7735758ec5
3 changed files with 2 additions and 6 deletions

View File

@ -269,8 +269,7 @@ float PidIndustrial::getOutput(float target, float input, float dTime) {
// (error - previousError) = (target-input) - (target-prevousInput) = -(input - prevousInput)
dTerm = dTerm * ad + (error - previousError) * bd;
// update the I-term
iTerm += parameters->iFactor * dTime * error;
updateITerm(parameters->iFactor * dTime * error);
// calculate output and apply the limits
float output = pTerm + iTerm + dTerm + getOffset();

View File

@ -73,8 +73,6 @@ public:
float iTermMax = 1000000.0;
protected:
pid_s *parameters;
private:
virtual void updateITerm(float value);
};

View File

@ -101,8 +101,7 @@ TEST(util, industrialPidLimits) {
commonPidTestParameters(&pidS);
PidIndustrial pid(&pidS);
// todo: #1599
// commonPidTest(&pid);
commonPidTest(&pid);
}
TEST(util, pidIndustrial) {