From 54192ade025f1299494a9393e616a70fd60052f5 Mon Sep 17 00:00:00 2001 From: glipR <37640160+glipR@users.noreply.github.com> Date: Fri, 11 Sep 2020 15:04:55 +1000 Subject: [PATCH 1/2] Ensure `wait_for_tick` also waits for writes to occur. --- ev3sim/attach.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ev3sim/attach.py b/ev3sim/attach.py index dc9b6c0a..7c7bb2d7 100644 --- a/ev3sim/attach.py +++ b/ev3sim/attach.py @@ -235,8 +235,10 @@ def sleep(seconds): data['last_checked_tick'] = data['tick'] def wait_for_tick(): - if data['last_checked_tick'] == data['tick']: - with data['condition_updated']: + with data['condition_updated']: + while data['actions_queue'].qsize(): + data['condition_updated'].wait(0.1) + if data['last_checked_tick'] == data['tick']: while True: if data['last_checked_tick'] != data['tick']: data['last_checked_tick'] = data['tick'] From ca255df3a4534e01a2efc96065b024b714b0d824 Mon Sep 17 00:00:00 2001 From: Peter Drew Date: Fri, 11 Sep 2020 16:02:29 +1000 Subject: [PATCH 2/2] bump version 1.2.3 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8fae4fe6..9f1966ad 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setup( name="ev3sim", - version="1.2.2", + version="1.2.3", description="Simulate ev3dev programs in Python", long_description=README, long_description_content_type="text/markdown",