2014 Eurobot fork

Dependencies:   mbed-rtos mbed QEI

Revision:
85:b0858346d838
Parent:
84:00c799fd10a7
Child:
86:769e33a3f0ff
--- a/Processes/AI/ai.cpp	Tue Apr 16 10:05:58 2013 +0000
+++ b/Processes/AI/ai.cpp	Tue Apr 16 10:43:15 2013 +0000
@@ -64,12 +64,13 @@
    
     MotorControl::motorsenabled = false;
     arm::upper_arm.go_up();
-    arm::lower_arm.go_up();
+    arm::lower_arm.go_down();
     
     Thread::signal_wait(0x2); //wait for cord
     
     // CORD PULLED
     MotorControl::motorsenabled = true;
+    arm::lower_arm.go_up();
     
     #ifdef TEAM_BLUE
     Waypoint mid_wp = {1.8, 1, (1.0/4.0)*PI, 0.03, 0.05*PI, 32};
@@ -87,7 +88,7 @@
     
     Waypoint mutable_cake_wp = {0, 0, 0, 0.01, 0.01*PI, 512};
     
-    float r = 0.26+0.35+0.01+0.01; //second 0.01 for being less collisiony with sensors
+    float r = 0.26+0.35-0.01; //second 0.01 for being less collisiony with sensors
     
     layer layer_to_push = top_layer;
     
@@ -132,7 +133,7 @@
             if ((colour_read==own_colour) && MotorControl::motorsenabled)
             {
                 arm::upper_arm.go_down();
-                top_arm_up_timer.start(1200);
+                top_arm_up_timer.start(1100);
             }
         }
         else
@@ -141,10 +142,10 @@
             if ((colour_read==own_colour || i==5 || i==7 || i==8 || i==10/*|| colour_read==WHITE*/) && MotorControl::motorsenabled)
             {
                 arm::lower_arm.go_down();
-                bottom_arm_up_timer.start(1200);
+                bottom_arm_up_timer.start(1100);
             }
         }
-        Thread::wait(2200);
+        Thread::wait(2000);
     }
     
     ////////////////////