From 7ccdf8be771481706c49da67b95a3faab5edc548 Mon Sep 17 00:00:00 2001
From: Damien George <damien.p.george@gmail.com>
Date: Wed, 29 Jul 2015 00:21:22 +0100
Subject: [PATCH] tools/pyboard.py: Fix read timeout calc to work with shorter
 sleep.

---
 tools/pyboard.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/pyboard.py b/tools/pyboard.py
index 9157c6058..eebb9186d 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
-- 
GitLab