Update runtime LED modes

This commit is contained in:
2024-04-29 12:33:54 -05:00
parent c52fe167bf
commit 62bcb07956
6 changed files with 60 additions and 45 deletions

View File

@@ -58,7 +58,7 @@ class DriveImg():
except:
self.onLine = False
self.trans.close()
return resposta
return "Error", None
ret = self.trans.recv(64)
try:
valida = str(ret[0:15].decode('UTF-8'))
@@ -68,13 +68,13 @@ class DriveImg():
self.trans.close()
#sleep(2)
gravaLog(ip=self.ip,tipo="Falha",msg=f'Unable to find TC IMAGE bookmark')
return "Error"
return "Error", None
except Exception as ex:
self.onLine = False
self.trans.close()
#sleep(2)
gravaLog(ip=self.ip,tipo="Falha",msg=f'Error - {str(ex)}')
return "Error"
return "Error", None
if ret:
frame = int.from_bytes(ret[24:27],"little")
isJpeg = int.from_bytes(ret[32:33],"little")
@@ -117,7 +117,7 @@ class DriveImg():
self.onLine = False
self.trans.close()
#sleep(2)
return resposta
return "Error", None
class DriveData():
HEADERSIZE = 100