Module 9 Super Team / Mbed 2 deprecated hookey_controller

Dependencies:   EMG1 PIDController1 compute mbed InBetweenController PinDetect QEI

Revision:
4:e021dacffa24
Parent:
3:0634f55c2021
Child:
5:5339a7be9fb7
--- a/main.cpp	Tue Oct 20 09:44:30 2015 +0000
+++ b/main.cpp	Tue Oct 20 09:57:07 2015 +0000
@@ -5,8 +5,6 @@
 
 // Define Objects
 Ticker      sample_timer;
-double      lastA;
-double      lastB;
 
 void tick() {
     // EMG Reader
@@ -15,13 +13,12 @@
     double output2 = sample(2);
     
     // In Between Controller
-    double nexta, nextb;
-    newPos(output0, output2, output2, lastA, lastB, nexta, nextb);
+    double lastA, lastB, nextA, nextB;
+    getCurrent(lastA, lastB);
+    newPos(output0, output2, output2, lastA, lastB, nextA, nextB);
     
-    lastA = nexta;
-    lastB = nextb;
-    
-    move(nexta,nextb);
+    // Rotate the motors
+    move(nextA,nextB);
 }
 
 int main()