PID Library Brought in from the PID Arduino Library

Dependents:   Basic_PID wheelchaircontrol wheelchaircontrolRosCom wheelchaircontrol ... more

Revision:
2:60801ab3cbf9
Parent:
0:58f3a6c65ad5
diff -r 37c3ab46d475 -r 60801ab3cbf9 PID.h
--- a/PID.h	Tue Aug 28 23:24:01 2018 +0000
+++ b/PID.h	Fri Aug 31 17:09:28 2018 +0000
@@ -13,7 +13,7 @@
       #define P_ON_M 0
       #define P_ON_E 1
     Timer PIDtimer;
-    PID(double* Input, double* Output, double* Setpoint,
+    PID(volatile double* Input, volatile double* Output, volatile double* Setpoint,
         double Kp, double Ki, double Kd, int POn, int ControllerDirection); 
     void SetMode(int Mode);               // * sets PID to either Manual (0) or Auto (non-0)
 
@@ -66,9 +66,9 @@
     int controllerDirection;
     int pOn;
 
-    double *myInput;              // * Pointers to the Input, Output, and Setpoint variables
-    double *myOutput;             //   This creates a hard link between the variables and the 
-    double *mySetpoint;           //   PID, freeing the user from having to constantly tell us
+    volatile double *myInput;              // * Pointers to the Input, Output, and Setpoint variables
+    volatile double *myOutput;             //   This creates a hard link between the variables and the 
+    volatile double *mySetpoint;           //   PID, freeing the user from having to constantly tell us
                                   //   what these values are.  with pointers we'll just know.
               
     double lastTime;