mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-03 03:01:40 +02:00
RPI: don't throw exception when no valid frame was received
This commit is contained in:
parent
ddbb35eff3
commit
c6fb43c4ef
1 changed files with 1 additions and 1 deletions
|
@ -647,7 +647,7 @@ 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
|
||||
seq_last = max(frames, key=lambda frame:frame.seq).seq if len(frames) else 0
|
||||
self.__retransmit_frame(seq_last + 1)
|
||||
raise BufferError(f'Missing packet: Last packet {len(self.scratch)}')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue