Browse Source
Merge pull request #50 from Sprinterfreak/pypackage
Add pypackage retransmit last frame
pull/59/head
lumapu
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
tools/rpi/hoymiles/__init__.py
|
|
@ -619,6 +619,8 @@ class InverterTransaction: |
|
|
|
self.time_rx = end_frame.time_rx |
|
|
|
tr_len = end_frame.seq - 0x80 |
|
|
|
except StopIteration: |
|
|
|
seq_last = max(frames, key=lambda frame:frame.seq).seq |
|
|
|
self.__retransmit_frame(seq_last + 1) |
|
|
|
raise BufferError(f'Missing packet: Last packet {len(self.scratch)}') |
|
|
|
|
|
|
|
# Rebuild payload from unordered frames |
|
|
|