mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
initial support for telemetry to see if things come in
This commit is contained in:
parent
6a3da79af2
commit
aef1801446
5 changed files with 25 additions and 2 deletions
|
|
@ -358,7 +358,20 @@ class MessageReader:
|
|||
}
|
||||
|
||||
await self.dispatcher.dispatch(Event(EventType.TRACE_DATA, res, attributes))
|
||||
|
||||
elif packet_type_value == PacketType.TELEMETRY_RESPONSE.value:
|
||||
logger.debug(f"Received telemetry data: {data.hex()}")
|
||||
res = {}
|
||||
|
||||
res["pubkey_pre"] = data[2:8].hex()
|
||||
res["data"] = data[8:12].hex()
|
||||
|
||||
attributes = {
|
||||
"data" : res["data"],
|
||||
}
|
||||
|
||||
await self.dispatcher.dispatch(Event(EventType.TELEMETRY_RESPONSE, res, attributes))
|
||||
|
||||
else:
|
||||
logger.debug(f"Unhandled data received {data}")
|
||||
logger.debug(f"Unhandled packet type: {packet_type_value}")
|
||||
Loading…
Add table
Add a link
Reference in a new issue