]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
robofsm/robot.c, robodim: acropolis diameter moved to robodim.h
authorFilip Jares <filipjares@post.cz>
Thu, 23 Apr 2009 12:41:27 +0000 (14:41 +0200)
committerFilip Jares <filipjares@post.cz>
Thu, 23 Apr 2009 12:41:27 +0000 (14:41 +0200)
src/robodim/robodim.h
src/robofsm/robot.c

index 5a4b0bb17233004d59cf232e9bf7d166654fc741..a4dd65fd102147933676a8c536b92f9d4e61afac 100644 (file)
@@ -95,6 +95,8 @@
 #define PLAYGROUND_HEIGHT_MM   2100
 #define PLAYGROUND_HEIGHT_M    (PLAYGROUND_HEIGHT_MM/1000.0)
 
+#define ACROPOLIS_RADIUS       0.35
+
 /**
  * PUCK DISPENSERS (= COLUMN ELEMENT DISPENSERS)
  */
index 549c760107d20ab659be316b601c2b7aec6ff038..d0d9d04e8310fdd9ac74969e329790f3aaf9e772 100644 (file)
@@ -80,8 +80,9 @@ void fill_in_known_areas_in_map()
        //ShmapSetRectangleFlag(2.8, 0.0, 3.0, 0.6, MAP_FLAG_IGNORE_OBST, 0); /* right basket */
 
        /* Construction areas (Building zones) */
-       double RADIUS = 0.35;
-       ShmapSetRectangleFlag(1.5 - RADIUS, 1.05 - RADIUS, 1.5 + RADIUS, 1.05 + RADIUS, MAP_FLAG_WALL, 0);               /* Central construction area */
+       double x_center = (PLAYGROUND_WIDTH_M/2.0);
+       double y_center = (PLAYGROUND_HEIGHT_M/2.0);
+       ShmapSetRectangleFlag(x_center - ACROPOLIS_RADIUS, y_center - ACROPOLIS_RADIUS, x_center + ACROPOLIS_RADIUS, y_center + ACROPOLIS_RADIUS, MAP_FLAG_WALL, 0);             /* Central construction area */
        //ShmapSetRectangleFlag(1.35, 0.9, 1.65, 1.2, MAP_FLAG_WALL, 0);                 /* Central construction area */
 }