from greg
Fork of PID by
Revision 1:01f3ec7bd956, committed 2013-06-08
- Comitter:
- dereklmc
- Date:
- Sat Jun 08 19:31:29 2013 +0000
- Parent:
- 0:7e5fe0bea780
- Child:
- 2:b214010a0c1b
- Commit message:
- Fixed proportialControl naming
Changed in this revision
PID.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/PID.cpp Thu Jun 06 18:58:08 2013 +0000 +++ b/PID.cpp Sat Jun 08 19:31:29 2013 +0000 @@ -28,7 +28,7 @@ const float dt) { float currentError; - float proportialControl, integralControl, derivativeControl; + float proportionalControl, integralControl, derivativeControl; // How far away we are from the target currentError = targetPosition - currentPosition; @@ -50,6 +50,6 @@ // Save current error for next call to correction previousError = currentError; - return proportialControl + integralControl + derivativeControl; + return proportionalControl + integralControl + derivativeControl; }