2014 Eurobot fork

Dependencies:   mbed-rtos mbed QEI

Revision:
76:532d9bc1d2aa
Parent:
70:0da6ca845762
Child:
77:8d83a0c00e66
diff -r 0da6ca845762 -r 532d9bc1d2aa Processes/AI/ai.cpp
--- a/Processes/AI/ai.cpp	Sun Apr 14 22:02:21 2013 +0000
+++ b/Processes/AI/ai.cpp	Mon Apr 15 13:53:58 2013 +0000
@@ -19,7 +19,8 @@
     Waypoint *wpptr;
 };
 
-void arm_upper(const void *dummy); //TODO: kill
+void raise_top_arm(const void *dummy);
+void raise_bottom_arm(const void *dummy);
 
 void delayed_setter(const void *tid_wpptr); //TODO: kill the hack
 
@@ -45,7 +46,7 @@
     bool firstavoidstop = 1;
     delayed_struct ds = {Thread::gettid(),&current_waypoint};
     RtosTimer delayed_wp_set(delayed_setter, osTimerOnce, (void *)&ds);
-    RtosTimer delayed_armer(arm_upper, osTimerOnce);
+    RtosTimer top_arm_up_timer(raise_top_arm, osTimerOnce);
     
     for (float phi=(180-11.25)/180*PI; phi > 11.25/180*PI;)
     {
@@ -56,7 +57,7 @@
             //Thread::wait(1000);
             arm::upper_arm.go_down();
             delayed_done = false;
-            delayed_armer.start(1200);
+            top_arm_up_timer.start(1200);
             delayed_wp_set.start(2400);
             //Thread::wait(2000);
             //arm::upper_arm.go_up();
@@ -88,15 +89,19 @@
     }
 }
 
-void arm_upper(const void *dummy)
+void raise_top_arm(const void *dummy)
 {
     arm::upper_arm.go_up();
 }
 
+void raise_bottom_arm(const void *dummy)
+{
+    arm::lower_arm.go_up();
+}
+
 void delayed_setter(const void *tid_wpptr) //TODO: kill the hack
 {
     delayed_struct *dsptr = (delayed_struct *)tid_wpptr;
-    //arm::upper_arm.go_up();
     motion::setNewWaypoint(dsptr->tid,dsptr->wpptr);
     delayed_done = true;
 }