Buggy bois / Mbed 2 deprecated HEATS_2

Dependencies:   mbed

Revision:
9:cefa177c1353
Parent:
6:477382219bcf
--- a/PID2.h	Sun Mar 31 20:31:30 2019 +0000
+++ b/PID2.h	Fri Apr 05 16:11:28 2019 +0000
@@ -28,7 +28,7 @@
     
     float compute (float currVal)
     {
-    float currErr = setPoint - currVal;
+    float currErr = currVal - setPoint;
     float controlAction;
     
     if (currVal > inMax_) {inMax_ = currVal;}
@@ -65,8 +65,8 @@
     
     void assignLimitAddress(float *outMax, float *outMin)
     {
-        outMin_ = outMax; 
-        outMax_ = outMin;
+        outMin_ = outMin; 
+        outMax_ = outMax;
     }
     
     float scaler(float prevMin, float prevMax, float newMin, float newMax, float var)