git.droids-corp.org
/
aversive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wait obstacle -- c nul en fait
[aversive.git]
/
projects
/
microb2010
/
mainboard
/
display.py
diff --git
a/projects/microb2010/mainboard/display.py
b/projects/microb2010/mainboard/display.py
index
576cd25
..
583f9a8
100644
(file)
--- a/
projects/microb2010/mainboard/display.py
+++ b/
projects/microb2010/mainboard/display.py
@@
-174,9
+174,7
@@
def init_waypoints():
(not (i == WAYPOINTS_NBX-1 and j == WAYPOINTS_NBY-1)):
waypoints[i][j] = TYPE_BALL
continue
(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 and \
- (not (i == 0 and j == WAYPOINTS_NBY-1)) and \
- (not (i == WAYPOINTS_NBX-1 and j == WAYPOINTS_NBY-1)):
+ if (i == 0 or i == WAYPOINTS_NBX-1) and j > 2 and j < 7:
waypoints[i][j] = TYPE_BALL
continue
waypoints[i][j] = TYPE_BALL
continue
@@
-307,7
+305,7
@@
def set_robot():
lspickle.axis = axis
lspickle.size = (20, ROBOT_WIDTH, 5)
if robot_lspickle_autoharvest:
lspickle.axis = axis
lspickle.size = (20, ROBOT_WIDTH, 5)
if robot_lspickle_autoharvest:
- lspickle.color = (
1, 0, 0
)
+ lspickle.color = (
0.2, 0.2, 1
)
else:
lspickle.color = (0.4, 0.4, 0.4)
else:
lspickle.color = (0.4, 0.4, 0.4)
@@
-317,7
+315,7
@@
def set_robot():
rspickle.axis = axis
rspickle.size = (20, ROBOT_WIDTH, 5)
if robot_rspickle_autoharvest:
rspickle.axis = axis
rspickle.size = (20, ROBOT_WIDTH, 5)
if robot_rspickle_autoharvest:
- rspickle.color = (
1, 0, 0
)
+ rspickle.color = (
0.2, 0.2, 1
)
else:
rspickle.color = (0.4, 0.4, 0.4)
else:
rspickle.color = (0.4, 0.4, 0.4)
@@
-382,10
+380,10
@@
while True:
if not m:
m = re.match("cobboard=%s,%s"%(INT,INT), l)
if m:
if not m:
m = re.match("cobboard=%s,%s"%(INT,INT), l)
if m:
-
#
print "cobboard: %x,%x"%(int(m.groups()[0]),int(m.groups()[1]))
+ print "cobboard: %x,%x"%(int(m.groups()[0]),int(m.groups()[1]))
side = int(m.groups()[0])
flags = int(m.groups()[1])
side = int(m.groups()[0])
flags = int(m.groups()[1])
- if
side == 0
:
+ if
(side == 0 and color == YELLOW) or (side == 1 and color == BLUE)
:
robot_lspickle_deployed = ((flags & 1) * 2)
robot_lspickle_autoharvest = ((flags & 2) != 0)
else:
robot_lspickle_deployed = ((flags & 1) * 2)
robot_lspickle_autoharvest = ((flags & 2) != 0)
else: