From: Robin Krens Date: Sun, 11 Feb 2024 14:16:32 +0000 (+0100) Subject: RAPacker.py: fix high byte pkt len X-Git-Tag: v0.0.1~43 X-Git-Url: https://robinkrens.nl/gitweb/?a=commitdiff_plain;h=1a1fe535b34506293cd317c68b9e2e446210d490;p=renesas-ra-flasher RAPacker.py: fix high byte pkt len --- 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):