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:f61c47297c2c, committed 2016-04-20
- Comitter:
- wretrop
- Date:
- Wed Apr 20 21:27:43 2016 +0000
- Parent:
- 0:6e12a3e5af19
- Commit message:
- Isolated P term from other gain values.
Changed in this revision
| PID.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/PID.cpp Thu Sep 02 16:48:10 2010 +0000
+++ b/PID.cpp Wed Apr 20 21:27:43 2016 +0000
@@ -256,7 +256,8 @@
}
//Perform the PID calculation.
- controllerOutput_ = scaledBias + Kc_ * (error + (tauR_ * accError_) - (tauD_ * dMeas));
+ //controllerOutput_ = scaledBias + Kc_ * (error + (tauR_ * accError_) - (tauD_ * dMeas));
+ controllerOutput_ = scaledBias + Kc_ * error + (tauR_ * accError_) - (tauD_ * dMeas);
//Make sure the computed output is within output constraints.
if (controllerOutput_ < 0.0) {
