Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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
- Commit message:
- Fixed proportialControl naming
Changed in this revision
PID.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 7e5fe0bea780 -r 01f3ec7bd956 PID.cpp --- 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; }