backup codes

This commit is contained in:
2025-09-29 09:16:37 +08:00
parent 9f91cd63a0
commit d5c1a44f9d
2 changed files with 19 additions and 19 deletions

View File

@@ -209,13 +209,13 @@ class SerComm():
if not self.isDetectSerialPort: if not self.isDetectSerialPort:
self.isDetectSerialPort = True self.isDetectSerialPort = True
t = threading.Thread(target=self.detectSerialPortProcess) t = threading.Thread(target=self.detectSerialPortProcess)
t.setDaemon(True) t.setDaemon = True
t.start() t.start()
def openCloseSerial(self): def openCloseSerial(self):
self.ui.log('Serial Port waitting...') self.ui.log('Serial Port waitting...')
t = threading.Thread(target=self.openCloseSerialProcess) t = threading.Thread(target=self.openCloseSerialProcess)
t.setDaemon(True) t.setDaemon = True
t.start() t.start()
def receiveDataLoop(self): def receiveDataLoop(self):
@@ -294,13 +294,13 @@ class SerComm():
self.ui.log('%s: open success' % self.com.port) self.ui.log('%s: open success' % self.com.port)
self.comProgressStop = False self.comProgressStop = False
self.receiveProcess = threading.Thread(target=self.receiveDataLoop) self.receiveProcess = threading.Thread(target=self.receiveDataLoop)
self.receiveProcess.setDaemon(True) self.receiveProcess.setDaemon = True
self.receiveProcess.start() self.receiveProcess.start()
self.sendProcess = threading.Thread(target=self.sendDataLoop) self.sendProcess = threading.Thread(target=self.sendDataLoop)
self.sendProcess.setDaemon(True) self.sendProcess.setDaemon = True
self.sendProcess.start() self.sendProcess.start()
self.sendProcess = threading.Thread(target=self.ui.getSendDataLoop) self.sendProcess = threading.Thread(target=self.ui.getSendDataLoop)
self.sendProcess.setDaemon(True) self.sendProcess.setDaemon = True
self.sendProcess.start() self.sendProcess.start()
# save usercfg # save usercfg
self.ui.save_cfg('entry-split') self.ui.save_cfg('entry-split')

View File

@@ -2,18 +2,18 @@
"baud": "9600", "baud": "9600",
"btn-data01": { "btn-data01": {
"hex": 1, "hex": 1,
"title": "\u88ab\u52a8\u6a21\u5f0f", "title": "\u5355\u8138\u5f55\u5165",
"value": " 0A 00 35 00 02 04 02 06 01 44 18" "value": "5A A5 0A A1 A5 10 10 00 04 1D 01 00 0A EE EE"
}, },
"btn-data02": { "btn-data02": {
"hex": 1, "hex": 1,
"title": "\u5de1\u68c0\u6a21\u5f0f", "title": "\u8bfb\u53d6\u4eba\u8138",
"value": "0A 00 35 01 02 04 02 06 01 6F 1C" "value": "5A A5 07 A1 A5 10 10 00 01 24 EE EE"
}, },
"btn-data03": { "btn-data03": {
"hex": 1, "hex": 1,
"title": "F3\u5de1\u68c0", "title": "\u4eba\u8138\u8bc6\u522b",
"value": "5A A5 07 A2 A4 10 10 00 01 F3 EE EE" "value": "5A A5 09 A1 A5 10 10 00 03 12 00 0A EE EE"
}, },
"btn-data04": { "btn-data04": {
"hex": 0, "hex": 0,
@@ -27,18 +27,18 @@
}, },
"btn-data06": { "btn-data06": {
"hex": 1, "hex": 1,
"title": "F1\u91cd\u542f", "title": "\u5220\u9664\u4eba\u8138",
"value": "5A A5 07 FE A1 10 10 00 01 F1 EE EE\n" "value": "5A A5 09 A1 A5 10 10 00 03 20 00 01 EE EE"
}, },
"btn-data07": { "btn-data07": {
"hex": 1, "hex": 1,
"title": "\u5f00\u9501F3-0022", "title": "\u83b7\u53d6\u72b6\u6001",
"value": "5A A5 14 A2 A4 10 20 00 0E 12 0C 5A A5 07 00 16 10 10 04 01 03 FF EE FF EE" "value": "5A A5 07 A1 A5 10 10 00 01 11 EE EE"
}, },
"btn-data08": { "btn-data08": {
"hex": 1, "hex": 1,
"title": "R:2000+18", "title": "\u5173\u6389\u7535\u6e90",
"value": "5A A5 06 FE A1 03 20 00 18 EE EE" "value": "5A A5 07 A1 A5 10 10 00 01 F3 EE EE"
}, },
"btn-unpack01": { "btn-unpack01": {
"title": "HEX print", "title": "HEX print",
@@ -60,8 +60,8 @@
"title": "tc01-sens-cfg", "title": "tc01-sens-cfg",
"value": "len(data)>=25 and data[2]==0x14 and '\\n\\K=%s\\nKuser=%s\\nad0fix=%s\\nmlevel=%s\\nfofactor=%s\\nKntc=%s\\n' % (\nuint16(data[9:]),\nuint16(data[11:]),\nuint16(data[13:]),\nuint16(data[15:]),\nuint16(data[17:]),\nuint16(data[19:]))\n\n" "value": "len(data)>=25 and data[2]==0x14 and '\\n\\K=%s\\nKuser=%s\\nad0fix=%s\\nmlevel=%s\\nfofactor=%s\\nKntc=%s\\n' % (\nuint16(data[9:]),\nuint16(data[11:]),\nuint16(data[13:]),\nuint16(data[15:]),\nuint16(data[17:]),\nuint16(data[19:]))\n\n"
}, },
"cycle": "100", "cycle": "1000",
"encoding": "utf8", "encoding": "utf8",
"split": "50", "split": "100",
"uservar": "2,32200,0,0" "uservar": "2,32200,0,0"
} }