Merge pull request #35 from agessaman/main

Stats PacketType Cleanup
This commit is contained in:
fdlamotte 2025-11-25 07:35:17 +01:00 committed by GitHub
commit f7439ceac7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -36,9 +36,7 @@ class PacketType(Enum):
SIGN_START = 19
SIGNATURE = 20
CUSTOM_VARS = 21
STATS_CORE = 24
STATS_RADIO = 25
STATS_PACKETS = 26
STATS = 24
BINARY_REQ = 50
FACTORY_RESET = 51
PATH_DISCOVERY = 52

View file

@ -291,7 +291,7 @@ class MessageReader:
logger.debug(f"got custom vars : {res}")
await self.dispatcher.dispatch(Event(EventType.CUSTOM_VARS, res))
elif packet_type_value == PacketType.STATS_CORE.value: # RESP_CODE_STATS (24)
elif packet_type_value == PacketType.STATS.value: # RESP_CODE_STATS (24)
logger.debug(f"received stats response: {data.hex()}")
# RESP_CODE_STATS: All stats responses use code 24 with sub-type byte
# Byte 0: response_code (24), Byte 1: stats_type (0=core, 1=radio, 2=packets)