handle repeat mode

This commit is contained in:
Florent 2026-02-14 15:36:17 -04:00
parent d254c8e6ff
commit 8c33c09ac1
3 changed files with 28 additions and 0 deletions

View file

@ -607,6 +607,28 @@ class MessageReader:
Event(EventType.TELEMETRY_RESPONSE, res, attributes)
)
elif packet_type_value == PacketType.ALLOWED_REPEAT_FREQ.value:
res = {}
freqs = []
cont = True
try:
while cont:
min = int.from_bytes(dbuf.read(4), "little", signed=False)
max = int.from_bytes(dbuf.read(4), "little", signed=False)
if min == 0 or max == 0:
cont = False
else:
freqs.append({"min" : min, "max": max})
except e:
print(e)
res["freqs"] = freqs
await self.dispatcher.dispatch(
Event(EventType.ALLOWED_REPEAT_FREQ, res)
)
elif packet_type_value == PacketType.BINARY_RESPONSE.value:
dbuf.read(1)
tag = dbuf.read(4).hex()