We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2acaefd commit f5ecbbeCopy full SHA for f5ecbbe
ntv_firmware/twisted.py
@@ -69,7 +69,21 @@ def search():
69
sp.read(9999)
70
sp.reset_input_buffer()
71
sp.write("IDENTIFY\n")
72
- id = sp.readline()
+
73
+ replied = False
74
+ tries = 0
75
+ id = None
76
+ while not replied:
77
+ id = sp.readline()
78
+ if len(id) == 0:
79
+ tries += 1
80
+ if tries > 6:
81
+ id = ''
82
+ replied = True
83
+ else:
84
85
86
87
if id == "":
88
log("NOT_NTV_FIRMWARE\n")
89
continue
setup.py
@@ -1,7 +1,7 @@
1
from setuptools import setup
2
3
setup(name='ntv-firmware',
4
- version='1.0.1',
+ version='1.0.2',
5
description='Utility function for locating the serial port of a particular firmware device.',
6
url='https://git.native.com/ntv/python-firmware',
7
author='Alan Pich',
0 commit comments