Module 9 Super Team / Mbed 2 deprecated hookey_controller

Dependencies:   EMG1 PIDController1 compute mbed InBetweenController PinDetect QEI

Revision:
17:b1d8c215b7ea
Parent:
16:b977ba7ed362
Child:
18:ff312179cf44
--- a/main.cpp	Thu Oct 29 17:13:29 2015 +0000
+++ b/main.cpp	Thu Oct 29 17:47:35 2015 +0000
@@ -37,85 +37,12 @@
     b = getOffset(2) - b;
 
     // TODO: Remove debugging overrides
-    if (debug_tick < 5) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 10) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 1;
-    } else if (debug_tick < 20) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 25) {
-        emg_out0 = 1;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 30) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 40) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 1;
-    } else if (debug_tick < 45) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 55) {
-        emg_out0 = 0;
-        emg_out1 = 1;
-        emg_out2 = 0;
-    } else if (debug_tick < 60) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 70) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 1;
-    } else {
+    if (debug_tick < 1) {
         emg_out0 = 0;
         emg_out1 = 0;
         emg_out2 = 0;
     }
-
-    /*if (debug_tick < 10) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 15) {
-        emg_out0 = 1;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 25) {
-        emg_out0 = 0;
-        emg_out1 = 1;
-        emg_out2 = 0;
-    } else if (debug_tick < 35) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 45) {
-        emg_out0 = 1;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 55) {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    } else if (debug_tick < 65) {
-        emg_out0 = 0;
-        emg_out1 = 1;
-        emg_out2 = 0;
-    } else {
-        emg_out0 = 0;
-        emg_out1 = 0;
-        emg_out2 = 0;
-    }*/
+    debug_tick++;
 
     // Calculate the new position using the EMG output and the current position
     bool pushing;
@@ -137,7 +64,6 @@
     else
         rotate(x,y);
 
-    debug_tick++;
 }
 
 /* Functions which get called by tickers */
@@ -221,7 +147,7 @@
 
     movement_timer.attach(&goMotor, 0.01f);
 
-    //rotate(a,b);
+    rotate(a,b);
 
     /* The main while-loop */
     while(1) {