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.
Diff: Classic_PID.cpp
- Revision:
- 2:f78e083a20c4
- Parent:
- 1:f85ca5649d55
- Child:
- 3:715c8245e671
--- a/Classic_PID.cpp	Mon Nov 17 10:40:27 2014 +0000
+++ b/Classic_PID.cpp	Mon Jan 19 14:20:30 2015 +0000
@@ -101,7 +101,7 @@
     float Intergral = _Ki * _sumError;                                 // Calculate the Intergral part
     
     // Calculate the output
-    _output = (_setPoint * _kvelff) + Proportional + Intergral; 
+    _output = ((1 / _setPoint) * _kvelff) + Proportional + Intergral; 
         
     // Check for wind-up
     if(_output > _maxLimit)