mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
parse telemetry data with pycayennelpp
This commit is contained in:
parent
7ecd237377
commit
0aa586fe4e
2 changed files with 5 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ classifiers = [
|
|||
]
|
||||
license = "MIT"
|
||||
license-files = ["LICEN[CS]E*"]
|
||||
dependencies = [ "bleak", "pyserial-asyncio" ]
|
||||
dependencies = [ "bleak", "pyserial-asyncio", "pycayennelpp" ]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = ["pytest", "pytest-asyncio"]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import sys
|
||||
import logging
|
||||
import asyncio
|
||||
from cayennelpp import LppFrame
|
||||
from typing import Any, Optional, Dict
|
||||
from .events import Event, EventType, EventDispatcher
|
||||
from .packets import PacketType
|
||||
|
|
@ -378,7 +379,9 @@ class MessageReader:
|
|||
res = {}
|
||||
|
||||
res["pubkey_pre"] = data[2:8].hex()
|
||||
res["data"] = data[8:12].hex()
|
||||
buf = data[8:]
|
||||
res["data"] = buf.hex()
|
||||
res["lpp"] = LppFrame().from_bytes(buf)
|
||||
|
||||
attributes = {
|
||||
"data" : res["data"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue