Skip to content

Commit

Permalink
Ensure that mode changes wait for tick, as it is necessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
glipR committed Jun 10, 2021
1 parent 7ceb815 commit 23119b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ev3sim/attach_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ def seek(self, i):

def write(self, value):
send_q.put((DEVICE_WRITE, (f"{self.k2} {self.k3} {self.k4}", value.decode())))
while self.k4 == "mode" and current_data[self.k2][self.k3][self.k4] != value.decode():
wait_for_tick()

def flush(self):
pass
Expand Down

0 comments on commit 23119b5

Please sign in to comment.