herolic / aeroquad

Automatically exported from code.google.com/p/aeroquad
0 stars 0 forks source link

updatePID does not use windupGuard from PID structures #99

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
updatePID currently has the code:

PIDparameters->integratedError = constrain(PIDparameters->integratedError, 
-windupGuard, windupGuard);

should this be

PIDparameters->integratedError = constrain(PIDparameters->integratedError, 
-PIDparameters->windupGuard, PIDparameters->windupGuard);

otherwise the windupGuard defined for each type PID is ignored and the global 
windupGuard defined in AeroQuad.h is used.

Original issue reported on code.google.com by wila...@gmail.com on 6 Feb 2011 at 7:06

GoogleCodeExporter commented 9 years ago
You are correct.  I recently just made the windupGuard defined per PID for 
starting work on altitude hold.  I did not take the time to make it backwards 
compatible with Stable Mode, etc.

We are restructurng the code, so this will be fixed then.  I'll mark this as 
accepted, to make sure this is completed.  Good eye, no one else noticed it, 
but I've been meaning to go back and fix.

Original comment by CaranchoEngineering@gmail.com on 7 Feb 2011 at 2:05