mirror of
https://github.com/meshtastic/python.git
synced 2026-09-14 14:28:24 -04:00
add test code for #47
This commit is contained in:
1 parent
3bfec71e0a
commit
e89be6d56a
1 file changed
+10
@@ -0,0 +1,10 @@
|
||||
|
||||
# reported by @ScriptBlock
|
||||
|
||||
import meshtastic, sys
|
||||
from pubsub import pub
|
||||
def onConnection(interface, topic=pub.AUTO_TOPIC): # called when we (re)connect to the radio
|
||||
print(interface.myInfo)
|
||||
interface.close()
|
||||
pub.subscribe(onConnection, "meshtastic.connection.established")
|
||||
interface = meshtastic.TCPInterface(sys.argv[1])
|
||||
Reference in new issue
Block a user