Skip to content
Snippets Groups Projects
Commit 7ccdf8be authored by Damien George's avatar Damien George
Browse files

tools/pyboard.py: Fix read timeout calc to work with shorter sleep.

parent f5d04750
No related branches found
No related tags found
No related merge requests found
...@@ -133,11 +133,10 @@ class Pyboard: ...@@ -133,11 +133,10 @@ class Pyboard:
data = data + new_data data = data + new_data
if data_consumer: if data_consumer:
data_consumer(new_data) data_consumer(new_data)
#time.sleep(0.01)
timeout_count = 0 timeout_count = 0
else: else:
timeout_count += 1 timeout_count += 1
if timeout is not None and timeout_count >= 10 * timeout: if timeout is not None and timeout_count >= 100 * timeout:
break break
time.sleep(0.01) time.sleep(0.01)
return data return data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment