fix: update MiniMateClient and protocol to ensure correct handling of 1F calls and improve event download sequence

This commit is contained in:
2026-04-06 15:58:03 -04:00
parent 227c481022
commit ad1c9e48b0
5 changed files with 130 additions and 46 deletions
+6 -3
View File
@@ -386,13 +386,15 @@ class S3FrameParser:
_IN_FRAME_DLE = 3
def __init__(self) -> None:
self._state = self._IDLE
self._body = bytearray() # accumulates de-stuffed frame bytes
self._state = self._IDLE
self._body = bytearray() # accumulates de-stuffed frame bytes
self.frames: list[S3Frame] = []
self.bytes_fed: int = 0 # cumulative raw bytes fed since last reset
def reset(self) -> None:
self._state = self._IDLE
self._state = self._IDLE
self._body.clear()
self.bytes_fed = 0
def feed(self, data: bytes) -> list[S3Frame]:
"""
@@ -401,6 +403,7 @@ class S3FrameParser:
Returns a list of S3Frame objects completed during this call.
All completed frames are also appended to self.frames.
"""
self.bytes_fed += len(data)
completed: list[S3Frame] = []
for b in data:
frame = self._step(b)