Updates error values

Dependents:   locomotion_pid_action_refactor_EMG

Revision:
0:cb9eda46a58c
Child:
1:9e2c9237d88b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/errorFetch.h	Fri Oct 20 12:24:03 2017 +0000
@@ -0,0 +1,24 @@
+#ifndef ERRORFETCH_H
+#define ERRORFETCH_H
+
+#include "mbed.h"
+#include "QEI.h"
+#include "refGen.h"
+
+class errorFetch {
+public:
+    errorFetch(QEI, float, float, refGen); // Constructor sets up the pin to read the reference from
+    volatile float e_pos;
+    volatile float e_int;
+    volatile float e_der;
+    volatile float e_prev;
+    
+    void getError(); // Gets reference position on specified pin
+    refGen ref;
+    
+private:
+    QEI motorEncoder;
+    const float gearRatio;
+    const float Ts;
+    };
+#endif
\ No newline at end of file