mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
Fix residual packet types and rename STATS_CORE to STATS to match MyMesh.cpp
This commit is contained in:
@@ -35,9 +35,7 @@ class PacketType(Enum):
|
|||||||
SIGN_START = 19
|
SIGN_START = 19
|
||||||
SIGNATURE = 20
|
SIGNATURE = 20
|
||||||
CUSTOM_VARS = 21
|
CUSTOM_VARS = 21
|
||||||
STATS_CORE = 24
|
STATS = 24 # RESP_CODE_STATS - all stats responses use this code with a subtype byte
|
||||||
STATS_RADIO = 25
|
|
||||||
STATS_PACKETS = 26
|
|
||||||
BINARY_REQ = 50
|
BINARY_REQ = 50
|
||||||
FACTORY_RESET = 51
|
FACTORY_RESET = 51
|
||||||
PATH_DISCOVERY = 52
|
PATH_DISCOVERY = 52
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ class MessageReader:
|
|||||||
logger.debug(f"got custom vars : {res}")
|
logger.debug(f"got custom vars : {res}")
|
||||||
await self.dispatcher.dispatch(Event(EventType.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()}")
|
logger.debug(f"received stats response: {data.hex()}")
|
||||||
# RESP_CODE_STATS: All stats responses use code 24 with sub-type byte
|
# 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)
|
# Byte 0: response_code (24), Byte 1: stats_type (0=core, 1=radio, 2=packets)
|
||||||
|
|||||||
Reference in New Issue
Block a user