summaryrefslogtreecommitdiffstatshomepage
path: root/tools/pyboard.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-07-29 00:21:22 +0100
committerDamien George <damien.p.george@gmail.com>2015-07-29 00:21:22 +0100
commit7ccdf8be771481706c49da67b95a3faab5edc548 (patch)
tree6604c68cf9c01203f96207b02cbfd54d76e878bd /tools/pyboard.py
parentf5d04750dbd13bfc10498e20428b1a285ec417af (diff)
downloadmicropython-7ccdf8be771481706c49da67b95a3faab5edc548.tar.gz
micropython-7ccdf8be771481706c49da67b95a3faab5edc548.zip
tools/pyboard.py: Fix read timeout calc to work with shorter sleep.
Diffstat (limited to 'tools/pyboard.py')
-rwxr-xr-xtools/pyboard.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/pyboard.py b/tools/pyboard.py
index 9157c6058f..eebb9186d1 100755
--- a/tools/pyboard.py
+++ b/tools/pyboard.py
@@ -133,11 +133,10 @@ class Pyboard:
data = data + new_data
if data_consumer:
data_consumer(new_data)
- #time.sleep(0.01)
timeout_count = 0
else:
timeout_count += 1
- if timeout is not None and timeout_count >= 10 * timeout:
+ if timeout is not None and timeout_count >= 100 * timeout:
break
time.sleep(0.01)
return data