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,