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

pull/1389/merge
Damien George 2015-07-29 00:21:22 +01:00
rodzic f5d04750db
commit 7ccdf8be77
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -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