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