From 1a1fe535b34506293cd317c68b9e2e446210d490 Mon Sep 17 00:00:00 2001 From: Robin Krens Date: Sun, 11 Feb 2024 15:16:32 +0100 Subject: [PATCH] RAPacker.py: fix high byte pkt len --- src/RAPacker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RAPacker.py b/src/RAPacker.py index 6652309..a72970d 100644 --- a/src/RAPacker.py +++ b/src/RAPacker.py @@ -63,7 +63,7 @@ TESTID = [ def calc_sum(cmd, data): data_len = len(data) - lnh = data_len + 1 & 0xFF00 + lnh = (data_len + 1 & 0xFF00) >> 8 lnl = data_len + 1 & 0x00FF res = lnh + lnl + cmd for i in range(data_len): -- 2.7.4