Module 9 Super Team / Mbed 2 deprecated hookey_controller

Dependencies:   EMG1 PIDController1 compute mbed InBetweenController PinDetect QEI

Revision:
6:4f8760baa448
Parent:
5:5339a7be9fb7
Child:
7:aad7d5cdecd3
--- a/main.cpp	Tue Oct 20 11:39:08 2015 +0000
+++ b/main.cpp	Tue Oct 20 14:31:58 2015 +0000
@@ -44,7 +44,7 @@
     newPos(output0, output1, output2, lastA, lastB, nextA, nextB);
     pc2.printf("CURRENT: %f rad | %f rad\r\nNEW: %f rad | %f rad\r\n",lastA, lastB, nextA, nextB);
     // Rotate the motors
-    move(nextA,nextB);
+    rotate(nextA,nextB);
 }
 
 void startAll() {
@@ -65,32 +65,17 @@
     cali.attach_deasserted(&calibrate);
     cali.setSampleFrequency();
     
-    pc2.printf("Buttons done\r\nStarting Initialization...\r\n\r\nMoving Motor #1...\r\n");
-    
-    double a,b;
-    calibrating = true;
-    while(calibrating) {
-        a+=0.00002;
-        move(a,b);
-    }
-    
-    pc2.printf("Calibrated Motor #1 (%f rad)\r\nMoving Motor #2...\r\n",a);
-    
-    calibrating = true;
-    while(calibrating) {
-        b+=0.00002;
-        move(a,b);
-    }
-    
-    pc2.printf("Calibrated Motor #2 (%f rad)\r\nFinished Initializarion.\r\n",b);
-    
-    IBC_init(a,b);
+    pc2.printf("Buttons done\r\nStarting Initialization...\r\n\r\n");
 }
 
 int main()
 {
+    init();
+    pc2.printf("STARTED!");
     // Initialize libraries
-    PID_init();
+    double a,b;
+    IBC_init(a,b);
+    PID_init(a,b);
     
     init();