Fork de Timer après le match à 61 points

Dependencies:   RoboClaw mbed

Fork of Timer by ARES

Revision:
26:b6e59194efba
Parent:
23:3a34b8b70da6
diff -r 3a34b8b70da6 -r b6e59194efba main.cpp
--- a/main.cpp	Wed Jan 20 16:06:36 2016 +0000
+++ b/main.cpp	Wed Jan 20 18:39:31 2016 +0000
@@ -44,13 +44,21 @@
     init();
     //Construction des obstacles
     map.build();
-    map.AStar(0, 1000, 2000, 1000, 100);
+    map.AStar(odo.getX(), odo.getY(), 1400, 1000, 100);
     path = map.path;
     
     for(int i=0; i<path.size();i++) {
         odo.GotoXYT(path[i].x, path[i].y, 0);
     }
         
+        
+    map.AStar(odo.getX(), odo.getY(), 200, 1000, 100);
+    path = map.path;
+    
+    for(int i=0; i<path.size();i++) {
+        odo.GotoXYT(path[i].x, path[i].y, PI);
+    }
+    
     //odo.GotoXYT(500, 50, 0);
     //odo.GotoXYT(200, 0, 0);
     //odo.GotoXYT(0, 0, 0);
@@ -67,7 +75,7 @@
     pc.printf("Hello from main !\n\r");
     wait_ms(500);
     
-    odo.setPos(0, 0, 0);
+    odo.setPos(0, 1000, 0);
     roboclaw.ForwardM1(ADR, 0);
     roboclaw.ForwardM2(ADR, 0);