diff --git a/examples/tcp_gps_example.py b/examples/tcp_gps_example.py new file mode 100644 index 0000000..6bb064e --- /dev/null +++ b/examples/tcp_gps_example.py @@ -0,0 +1,14 @@ +"""Demonstration of how to look up a radio's location via its LAN connection. + Before running, connect your machine to the same WiFi network as the radio. +""" + +import meshtastic +import meshtastic.tcp_interface + +radio_hostname = "meshtastic.local" # Can also be an IP +iface = meshtastic.tcp_interface.TCPInterface(radio_hostname) +my_node_num = iface.myInfo.my_node_num +pos = iface.nodesByNum[my_node_num]["position"] +print (pos) + +iface.close() diff --git a/proto b/proto index 441303d..99ce578 160000 --- a/proto +++ b/proto @@ -1 +1 @@ -Subproject commit 441303d53110b6ab5f485065d467c36f6793ba73 +Subproject commit 99ce57802da9e8a3106d29b94e14e4a090cde3b3 diff --git a/setup.py b/setup.py index 422afc4..0a74f6f 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.3alpha.7", + version="1.3alpha.8", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown",