summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom van Leeuwen <tom.van.leeuwen@technolution.eu>2016-02-07 13:46:25 +0100
committerTom van Leeuwen <tom.van.leeuwen@technolution.eu>2016-02-07 13:46:25 +0100
commitd2317e71c42493b20ccbf4fb4577c2582541e378 (patch)
tree1005d8117ebe94d39512f6756c3aee1312ca0588
parenteab073848965842caed9e99ae825d08a2dfe0d31 (diff)
downloadtoprammer-d2317e71c42493b20ccbf4fb4577c2582541e378.zip
toprammer-d2317e71c42493b20ccbf4fb4577c2582541e378.tar.xz
Add a short sleep before re-trying to read the programmer version string
-rw-r--r--libtoprammer/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libtoprammer/main.py b/libtoprammer/main.py
index 965dbd3..bff19f1 100644
--- a/libtoprammer/main.py
+++ b/libtoprammer/main.py
@@ -200,12 +200,12 @@ class TOP(object):
)
# This is the first hardware access. Try several times since the programmer is in an unknown state.
- for _ in range(25):
+ for _ in range(5):
try:
versionString = self.hw.readVersionString()
break
except TOPException, e:
- pass
+ time.sleep(0.05)
else:
raise TOPException("Could not read version string from hardware")
for (regex, t) in versionRegex:
bues.ch cgit interface