from greg
Fork of PID by
Revision 4:e3cc82bee208, committed 2013-07-29
- Comitter:
- oprospero
- Date:
- Mon Jul 29 19:58:42 2013 +0000
- Parent:
- 3:8172f254dff4
- Child:
- 5:43a44c2880a3
- Commit message:
- Added individual PID terms for ROLL PITCH and YAW
Changed in this revision
PID.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/PID.cpp Wed Jul 03 02:40:06 2013 +0000 +++ b/PID.cpp Mon Jul 29 19:58:42 2013 +0000 @@ -34,7 +34,7 @@ currentError += targetPosition - currentPosition; // Sum of the errors the controller has incurred over time - integralError = currentError * dt; + integralError = currentError; // Cap the sum of errors to prevent excessive correction if (integralError < -windupGainGuard) { integralError = -windupGainGuard;