From: Robin Krens Date: Sun, 11 Feb 2024 13:39:18 +0000 (+0100) Subject: RAPacker.py: fix on package size boundary X-Git-Tag: v0.0.1~44 X-Git-Url: https://robinkrens.nl/gitweb/?a=commitdiff_plain;h=4c098b4eaec6eb16b683f4e3f5152dd522a9817c;p=renesas-ra-flasher RAPacker.py: fix on package size boundary --- diff --git a/src/RAPacker.py b/src/RAPacker.py index 8480267..6652309 100644 --- a/src/RAPacker.py +++ b/src/RAPacker.py @@ -99,7 +99,7 @@ def pack_command(cmd, data): # format of data packet is [SOD|LNH|LNL|RES|DAT|SUM|ETX] def pack_pkt(res, data): SOD = 0x81 - if (len(data) >= 1024): + if (len(data) > 1024): raise Exception(f'Data packet too large, data length is {DATA_LEN} (>1024)') LNH, LNL, SUM = calc_sum(int(res), data) if not isinstance(data, bytes):