mirror of
https://github.com/meshtastic/python.git
synced 2026-01-12 17:57:58 -05:00
lint
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
import sys
|
||||
"""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
|
||||
|
||||
node_ip = "192.168.42.1"
|
||||
iface = meshtastic.tcp_interface.TCPInterface(node_ip)
|
||||
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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user