From edc366c2a525483318c6651a8208242e03242a05 Mon Sep 17 00:00:00 2001 From: geeksville Date: Thu, 17 Sep 2020 16:24:27 -0700 Subject: [PATCH] improve docs --- meshtastic/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meshtastic/__init__.py b/meshtastic/__init__.py index 0860ebf..e3db689 100644 --- a/meshtastic/__init__.py +++ b/meshtastic/__init__.py @@ -26,6 +26,12 @@ type of packet, you should subscribe to the full topic name. If you want to see - meshtastic.receive.data(packet) - meshtastic.node.updated(node = NodeInfo) - published when a node in the DB changes (appears, location changed, username changed, etc...) +We receive position, user, or data packets from the mesh. You probably only care about meshtastic.receive.data. The first argument for +that publish will be the packet. Text or binary data packets (from sendData or sendText) will both arrive this way. If you print packet +you'll see the fields in the dictionary. decoded.data.payload will contain the raw bytes that were sent. If the packet was sent with +sendText, decoded.data.text will **also** be populated with the decoded string. For ASCII these two strings will be the same, but for +unicode scripts they can be different. + # Example Usage ``` import meshtastic