sitter3 bug fix
This commit is contained in:
parent
e21fd57743
commit
23a07470e6
@ -144,20 +144,25 @@ class DAC(object):
|
|||||||
self.firmware_string = "-"
|
self.firmware_string = "-"
|
||||||
self.got_broadcast(bp)
|
self.got_broadcast(bp)
|
||||||
|
|
||||||
try:
|
#try:
|
||||||
t1 = time.time()
|
t1 = time.time()
|
||||||
self.connect(self.last_broadcast.ip[0])
|
self.connect(self.last_broadcast.ip[0])
|
||||||
t = time.time() - t1
|
t = time.time() - t1
|
||||||
self.conn_status = "ok (%d ms)" % (t * 500)
|
self.conn_status = "ok (%d ms)" % (t * 500)
|
||||||
|
|
||||||
if self.last_broadcast.sw_rev < 2:
|
if self.last_broadcast.sw_rev < 2:
|
||||||
self.firmware_string = "(old)"
|
self.firmware_string = "(old)"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.conn.sendall('v')
|
self.conn.sendall(b'v')
|
||||||
self.firmware_string = self.read(32).replace("\x00", " ").strip()
|
self.firmware_string = self.read(32).replace("\x00", " ").strip()
|
||||||
except (Exception, e):
|
|
||||||
|
|
||||||
|
print('firmware string : ',self.firmware_string)
|
||||||
|
'''
|
||||||
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
self.conn_status = str(e)
|
self.conn_status = str(e)
|
||||||
|
'''
|
||||||
def connect(self, host, port = 7765):
|
def connect(self, host, port = 7765):
|
||||||
"""Connect to the DAC over TCP."""
|
"""Connect to the DAC over TCP."""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user