From f9ae012dbfe971114ced92987d39577cac239dbb Mon Sep 17 00:00:00 2001 From: murmur Date: Tue, 14 Mar 2023 22:04:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=85=A8=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 9f79070..70f84d1 100755 --- a/server.py +++ b/server.py @@ -105,7 +105,11 @@ def tt_hh(addr, data): update_pairs(addr, ccid) # 组帧再返回 msg = bytearray(data[:]) - msg[12:-1] = val = "%04x" % int(time.time()) + val = "%04x" % int(time.time()) + tmp=[] + for i in range(0,len(val),2): + tmp.append(int(val[i:i+2],16)) + msg[12:-1] = tmp # 计算校验和 crc = 0 for i in msg[:-1]: