Skip to content

Commit 7ccdf8b

Browse files
committed
tools/pyboard.py: Fix read timeout calc to work with shorter sleep.
1 parent f5d0475 commit 7ccdf8b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tools/pyboard.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,10 @@ def read_until(self, min_num_bytes, ending, timeout=10, data_consumer=None):
133133
data = data + new_data
134134
if data_consumer:
135135
data_consumer(new_data)
136-
#time.sleep(0.01)
137136
timeout_count = 0
138137
else:
139138
timeout_count += 1
140-
if timeout is not None and timeout_count >= 10 * timeout:
139+
if timeout is not None and timeout_count >= 100 * timeout:
141140
break
142141
time.sleep(0.01)
143142
return data

0 commit comments

Comments
 (0)