]> git.droids-corp.org - aversive.git/commitdiff
remove unexistant balls
authorzer0 <zer0@carbon.local>
Fri, 7 May 2010 23:10:58 +0000 (01:10 +0200)
committerzer0 <zer0@carbon.local>
Fri, 7 May 2010 23:10:58 +0000 (01:10 +0200)
projects/microb2010/mainboard/display.py

index 5700edce1f51dd7cc066c3bd7a6d8be868ca41f9..576cd2558a264845b78fb6c0d8aeceb8373ebc3f 100644 (file)
@@ -169,10 +169,14 @@ def init_waypoints():
                 continue
 
             # balls
-            if (i & 1) == 0 and j > 3:
+            if (i & 1) == 0 and j > 3 and \
+                    (not (i == 0 and j == WAYPOINTS_NBY-1)) and \
+                    (not (i == WAYPOINTS_NBX-1 and j == WAYPOINTS_NBY-1)):
                 waypoints[i][j] = TYPE_BALL
                 continue
-            if (i == 0 or i == WAYPOINTS_NBX-1) and j > 2:
+            if (i == 0 or i == WAYPOINTS_NBX-1) and j > 2 and \
+                    (not (i == 0 and j == WAYPOINTS_NBY-1)) and \
+                    (not (i == WAYPOINTS_NBX-1 and j == WAYPOINTS_NBY-1)):
                 waypoints[i][j] = TYPE_BALL
                 continue