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 @@ -762,6 +762,9 @@ def setSimpleConfig(modem_preset):
762762 qr = pyqrcode .create (url )
763763 print (qr .terminal ())
764764
765+ if args .listen :
766+ closeNow = False
767+
765768 have_tunnel = platform .system () == "Linux"
766769 if have_tunnel and args .tunnel :
767770 # pylint: disable=C0415
@@ -988,7 +991,7 @@ def common():
988991
989992 have_tunnel = platform .system () == "Linux"
990993 if (
991- args .noproto or args .reply or (have_tunnel and args .tunnel )
994+ args .noproto or args .reply or (have_tunnel and args .tunnel ) or args . listen
992995 ): # loop until someone presses ctrlc
993996 while True :
994997 time .sleep (1000 )
@@ -1336,6 +1339,12 @@ def initParser():
13361339 action = "store_true" ,
13371340 )
13381341
1342+ parser .add_argument (
1343+ "--listen" ,
1344+ help = "Just stay open and listen to the protobuf stream." ,
1345+ action = "store_true" ,
1346+ )
1347+
13391348 have_tunnel = platform .system () == "Linux"
13401349 if have_tunnel :
13411350 parser .add_argument (
You can’t perform that action at this time.
0 commit comments