mirror of https://github.com/commaai/panda.git
bad refactor, revert
This commit is contained in:
parent
52e93d5a45
commit
36a259855e
|
@ -163,14 +163,14 @@ class Panda(object):
|
|||
pass
|
||||
if not enter_bootloader:
|
||||
self.close()
|
||||
time.sleep(1.0)
|
||||
# wait up to 15 seconds
|
||||
for i in range(0, 15):
|
||||
try:
|
||||
self.connect()
|
||||
break
|
||||
except Exception:
|
||||
if i > 0:
|
||||
print("reconnecting is taking %d seconds..." % i)
|
||||
print("reconnecting is taking %d seconds..." % (i+1))
|
||||
if i == 14:
|
||||
raise Exception("reset failed")
|
||||
time.sleep(1.0)
|
||||
|
|
Loading…
Reference in New Issue