From 4d3c74bb30b7e08b4a94abc46350d8fbc7576570 Mon Sep 17 00:00:00 2001 From: zer0 Date: Sat, 8 May 2010 01:10:58 +0200 Subject: [PATCH] remove unexistant balls --- projects/microb2010/mainboard/display.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/microb2010/mainboard/display.py b/projects/microb2010/mainboard/display.py index 5700edc..576cd25 100644 --- a/projects/microb2010/mainboard/display.py +++ b/projects/microb2010/mainboard/display.py @@ -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 -- 2.20.1