backup codes

This commit is contained in:
vc4
2021-08-24 19:15:58 +08:00
parent fae01e174d
commit e7bb7d0ca9
2 changed files with 8 additions and 5 deletions

View File

@@ -157,15 +157,14 @@ class SerComm():
def receiveData(self):
while not self.receiveProgressStop:
#try:
if True:
try:
data = self.com.read(self.com.in_waiting)
if data:
self.ui.log('%s: recv %s bytes: %s...' % (self.com.port,len(data),str(data)[:16]))
self.ui.dmesg('recv', data)
time.sleep(0.01)
#except Exception as e:
# self.ui.log('%s: receive trace: %s' % (self.com.port,str(e)))
except Exception as e:
self.ui.log('%s: receive trace: %s' % (self.com.port,str(e)))
def sendData(self):
#try:

View File

@@ -17,5 +17,9 @@
"btn-unpack01": {
"title": "HEX print",
"value": "' '.join(['%02X'%x for x in data])"
},
"btn-unpack02": {
"title": "C style print",
"value": "'\\\\x'+'\\\\x'.join('%02x'%x for x in data)"
}
}