File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 "justMyCode" : true ,
4545 "args" : [" --debug" ]
4646 },
47+ {
48+ "name" : " meshtastic listen" ,
49+ "type" : " python" ,
50+ "request" : " launch" ,
51+ "module" : " meshtastic" ,
52+ "justMyCode" : true ,
53+ "args" : [" --listen" , " --debug" ]
54+ },
4755 {
4856 "name" : " meshtastic debug getPref" ,
4957 "type" : " python" ,
Original file line number Diff line number Diff line change @@ -761,6 +761,9 @@ def setSimpleConfig(modem_preset):
761761 qr = pyqrcode .create (url )
762762 print (qr .terminal ())
763763
764+ if args .listen :
765+ closeNow = False
766+
764767 have_tunnel = platform .system () == "Linux"
765768 if have_tunnel and args .tunnel :
766769 # pylint: disable=C0415
@@ -987,7 +990,7 @@ def common():
987990
988991 have_tunnel = platform .system () == "Linux"
989992 if (
990- args .noproto or args .reply or (have_tunnel and args .tunnel )
993+ args .noproto or args .reply or (have_tunnel and args .tunnel ) or args . listen
991994 ): # loop until someone presses ctrlc
992995 while True :
993996 time .sleep (1000 )
@@ -1335,6 +1338,12 @@ def initParser():
13351338 action = "store_true" ,
13361339 )
13371340
1341+ parser .add_argument (
1342+ "--listen" ,
1343+ help = "Just stay open and listen to the protobuf stream." ,
1344+ action = "store_true" ,
1345+ )
1346+
13381347 have_tunnel = platform .system () == "Linux"
13391348 if have_tunnel :
13401349 parser .add_argument (
You can’t perform that action at this time.
0 commit comments