modifications to run via legfile.txt and then exit, manage logfile versions, diagnostics file

Dependencies:   mbed MODSERIAL FATFileSystem

Revision:
59:4c04d5c7aed1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PidController/PidController.hpp	Fri Jun 15 20:11:46 2018 +0000
@@ -0,0 +1,45 @@
+#ifndef PIDCONTROLLER_H
+#define PIDCONTROLLER_H
+
+#include "mbed.h"
+
+class PIDController {
+public:
+    PIDController();
+    
+    void update(float position, float velocity, float dt);
+    float getOutput();
+    
+    void setPgain(float gain);
+    void setIgain(float gain);
+    void setDgain(float gain);
+    
+    void writeSetPoint(float cmd);
+    
+    void setHiLimit(float high_limit);
+    void setLoLimit(float low_limit);
+    
+    void toggleDeadBand(bool toggle);
+    void setDeadBand(float deadband);
+    
+    void setHeadingFlag(bool heading_flag);
+    
+protected:
+    float _setPoint;
+    float _error;
+    float _integral;
+    float _output;
+
+    float _Pgain;
+    float _Dgain;
+    float _Igain;
+    float _hiLimit; //these parameters clamp the allowable output
+    float _loLimit; //these parameters clamp the allowable output
+    float _deadband;
+    bool _deadbandFlag;
+    bool _headingFlag;
+    
+    float _temp_velocity;
+};
+
+#endif
\ No newline at end of file