From 18ff4971ec9152a1f4065ff58977c4dd87516254 Mon Sep 17 00:00:00 2001 From: kicer Date: Mon, 29 Sep 2025 11:12:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=8E=A5=E6=94=B6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=A7=A3=E6=9E=90=E7=9B=B8=E5=85=B3=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scomm.py | 4 ++++ usercfg.json | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scomm.py b/scomm.py index a1ddbf5..881ba9b 100755 --- a/scomm.py +++ b/scomm.py @@ -222,6 +222,10 @@ class UIProcessor: else: # recv prefix = "< " if self.ckbtn_time.var.get() else "" content = human_string(data, self.ckbtn_rhex.var.get(), encoding) + for cb in self.root.unpack.values(): + try: + if cb: content += eval(cb['value'],{'data':data, 'uint16':uint16,'int16':int16}) or '' + except: pass message = f"\n{timestamp}{prefix}{content}" self.text_handler.put_message(message) diff --git a/usercfg.json b/usercfg.json index 3ec1293..5426167 100644 --- a/usercfg.json +++ b/usercfg.json @@ -31,9 +31,9 @@ "value": "5A A5 09 A1 A5 10 10 00 03 20 00 01 EE EE" }, "btn-data07": { - "hex": 1, "title": "θŽ·ε–ηŠΆζ€", - "value": "5A A5 07 A1 A5 10 10 00 01 11 EE EE" + "value": "5A A5 07 A1 A5 10 10 00 01 11 EE EE", + "hex": 0 }, "btn-data08": { "hex": 1,