diff --git a/docs/meshtastic/index.html b/docs/meshtastic/index.html index 6bda8d8..afa3ff0 100644 --- a/docs/meshtastic/index.html +++ b/docs/meshtastic/index.html @@ -1082,6 +1082,7 @@ def _onTextReceive(iface, asDict): asDict["decoded"]["text"] = asBytes.decode("utf-8") except Exception as ex: logging.error(f"Malformatted utf8 in text message: {ex}") + _receiveInfoUpdate(iface, asDict) def _onPositionReceive(iface, asDict): @@ -1101,6 +1102,14 @@ def _onNodeInfoReceive(iface, asDict): n["user"] = p # We now have a node ID, make sure it is uptodate in that table iface.nodes[p["id"]] = n + _receiveInfoUpdate(iface, asDict) + + +def _receiveInfoUpdate(iface, asDict): + iface._getOrCreateByNum(asDict["from"])["lastReceived"] = asDict + iface._getOrCreateByNum(asDict["from"])["lastHeard"] = asDict.get("rxTime") + iface._getOrCreateByNum(asDict["from"])["snr"] = asDict.get("rxSnr") + iface._getOrCreateByNum(asDict["from"])["hopLimit"] = asDict.get("hopLimit") """Well known message payloads can register decoders for automatic protobuf parsing""" diff --git a/setup.py b/setup.py index 2d51b44..12aecb2 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="1.2.34", + version="1.2.35", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown",