Fix residual packet types and rename STATS_CORE to STATS to match MyMesh.cpp

This commit is contained in:
agessaman 2025-11-24 17:41:17 -08:00
parent 4a97dd0968
commit e49d5c4c7b
2 changed files with 2 additions and 4 deletions

View file

@ -35,9 +35,7 @@ class PacketType(Enum):
SIGN_START = 19
SIGNATURE = 20
CUSTOM_VARS = 21
STATS_CORE = 24
STATS_RADIO = 25
STATS_PACKETS = 26
STATS = 24 # RESP_CODE_STATS - all stats responses use this code with a subtype byte
BINARY_REQ = 50
FACTORY_RESET = 51
PATH_DISCOVERY = 52

View file

@ -286,7 +286,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)