backup codes
This commit is contained in:
7
scomm.py
7
scomm.py
@@ -157,15 +157,14 @@ class SerComm():
|
|||||||
|
|
||||||
def receiveData(self):
|
def receiveData(self):
|
||||||
while not self.receiveProgressStop:
|
while not self.receiveProgressStop:
|
||||||
#try:
|
try:
|
||||||
if True:
|
|
||||||
data = self.com.read(self.com.in_waiting)
|
data = self.com.read(self.com.in_waiting)
|
||||||
if data:
|
if data:
|
||||||
self.ui.log('%s: recv %s bytes: %s...' % (self.com.port,len(data),str(data)[:16]))
|
self.ui.log('%s: recv %s bytes: %s...' % (self.com.port,len(data),str(data)[:16]))
|
||||||
self.ui.dmesg('recv', data)
|
self.ui.dmesg('recv', data)
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
#except Exception as e:
|
except Exception as e:
|
||||||
# self.ui.log('%s: receive trace: %s' % (self.com.port,str(e)))
|
self.ui.log('%s: receive trace: %s' % (self.com.port,str(e)))
|
||||||
|
|
||||||
def sendData(self):
|
def sendData(self):
|
||||||
#try:
|
#try:
|
||||||
|
|||||||
@@ -17,5 +17,9 @@
|
|||||||
"btn-unpack01": {
|
"btn-unpack01": {
|
||||||
"title": "HEX print",
|
"title": "HEX print",
|
||||||
"value": "' '.join(['%02X'%x for x in data])"
|
"value": "' '.join(['%02X'%x for x in data])"
|
||||||
|
},
|
||||||
|
"btn-unpack02": {
|
||||||
|
"title": "C style print",
|
||||||
|
"value": "'\\\\x'+'\\\\x'.join('%02x'%x for x in data)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user