add test code for #47

This commit is contained in:
Kevin Hester committed 2020-12-27 16:24:12 +08:00
1 parent 3bfec71e0a
commit e89be6d56a
1 file changed
+10
+10
View File
@@ -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])