projects
/
renesas-ra-flasher
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f20539b
)
RAPacker.py: fix on package size boundary
author
Robin Krens
<robin@robinkrens.nl>
Sun, 11 Feb 2024 13:39:18 +0000
(14:39 +0100)
committer
Robin Krens
<robin@robinkrens.nl>
Sun, 11 Feb 2024 13:39:18 +0000
(14:39 +0100)
src/RAPacker.py
patch
|
blob
|
history
diff --git
a/src/RAPacker.py
b/src/RAPacker.py
index
8480267
..
6652309
100644
(file)
--- 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):