Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
"justMyCode": true,
"args": ["--debug"]
},
{
"name": "meshtastic listen",
"type": "python",
"request": "launch",
"module": "meshtastic",
"justMyCode": true,
"args": ["--listen", "--debug"]
},
{
"name": "meshtastic debug getPref",
"type": "python",
Expand Down
11 changes: 10 additions & 1 deletion meshtastic/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,9 @@ def setSimpleConfig(modem_preset):
qr = pyqrcode.create(url)
print(qr.terminal())

if args.listen:
closeNow = False

have_tunnel = platform.system() == "Linux"
if have_tunnel and args.tunnel:
# pylint: disable=C0415
Expand Down Expand Up @@ -987,7 +990,7 @@ def common():

have_tunnel = platform.system() == "Linux"
if (
args.noproto or args.reply or (have_tunnel and args.tunnel)
args.noproto or args.reply or (have_tunnel and args.tunnel) or args.listen
): # loop until someone presses ctrlc
while True:
time.sleep(1000)
Expand Down Expand Up @@ -1335,6 +1338,12 @@ def initParser():
action="store_true",
)

parser.add_argument(
"--listen",
help="Just stay open and listen to the protobuf stream.",
action="store_true",
)

have_tunnel = platform.system() == "Linux"
if have_tunnel:
parser.add_argument(
Expand Down