Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion robot/game_config/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def __repr__(self) -> str:
def bounding_box_color(self) -> tuple:
if self.type == MARKER_TYPE.ARENA: # If it is a wall
return tuple(reversed((225, 249, 125))) # Turquoise
elif self.type == MARKER_TYPE.ARENA_OBJECT: # Other arena object (e.g. pillar)
elif self.type == MARKER_TYPE.TREE: # Other arena object (e.g. pillar)
return tuple(reversed((255, 131, 125))) # Purple
elif self.owning_team == TEAM.ARENA: # If it is a supply
m = self if isinstance(self, TARGET_MARKER) else None
Expand Down
5 changes: 2 additions & 3 deletions robot/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def __init__(self,
self._hopper_client.open_pipe(self._start_pipe, delete=True, create=True, blocking=True) # Make sure to use blocking mode, otherwise start button code fails

self._log_pipe = PipeName((PipeType.INPUT, "log", "robot"), "/home/pi/pipes")
self._json_reader = JsonReader(self._hopper_client, self._start_pipe)

# Close stdout and stderr
os.close(1)
Expand Down Expand Up @@ -283,9 +284,7 @@ def _get_start_info(self):
"""Get the start infomation from the named pipe"""

# This call blocks until the start info is read
d = self._hopper_client.read(self._start_pipe).decode("utf-8")

settings = json.loads(d)
settings = self._json_reader.read()

assert "zone" in settings, "zone must be in startup info"
if settings["zone"] not in range(4):
Expand Down