X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Fmainboard%2Fdisplay.py;h=ff5bb02be2ee3bad98517cf6add5f38e328622e0;hp=576cd2558a264845b78fb6c0d8aeceb8373ebc3f;hb=HEAD;hpb=4d3c74bb30b7e08b4a94abc46350d8fbc7576570 diff --git a/projects/microb2010/mainboard/display.py b/projects/microb2010/mainboard/display.py index 576cd25..ff5bb02 100644 --- 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 - 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 @@ -307,7 +305,7 @@ def set_robot(): 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) @@ -317,7 +315,7 @@ def set_robot(): 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) @@ -382,10 +380,10 @@ while True: 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]) - 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: @@ -420,6 +418,8 @@ while True: fw.write("l") elif k == "r": fw.write("r") + elif k == "b": + fw.write("b") elif k == "c": robot_trail_list = [] elif k == "x":