From 9ffdc30c1f0bcfe5eec1a2ff645ee3625a9f99f6 Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Sun, 30 Jun 2024 23:25:07 -0700 Subject: [PATCH] Make remote hardware args live in their own little box --- meshtastic/__main__.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index cc9cff0..45c4345 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -1442,16 +1442,6 @@ def initParser(): "--reply", help="Reply to received messages", action="store_true" ) - group.add_argument( - "--gpio-wrb", nargs=2, help="Set a particular GPIO # to 1 or 0", action="append" - ) - - group.add_argument("--gpio-rd", help="Read from a GPIO mask (ex: '0x10')") - - group.add_argument( - "--gpio-watch", help="Start watching a GPIO mask for changes (ex: '0x10')" - ) - group.add_argument( "--no-time", help="Suppress sending the current time to the mesh", @@ -1531,6 +1521,21 @@ def initParser(): action="store_true", ) + remoteHardwareArgs = parser.add_argument_group('Remote Hardware', 'Arguments related to the Remote Hardware module') + + remoteHardwareArgs.add_argument( + "--gpio-wrb", nargs=2, help="Set a particular GPIO # to 1 or 0", action="append" + ) + + remoteHardwareArgs.add_argument( + "--gpio-rd", help="Read from a GPIO mask (ex: '0x10')" + ) + + remoteHardwareArgs.add_argument( + "--gpio-watch", help="Start watching a GPIO mask for changes (ex: '0x10')" + ) + + have_tunnel = platform.system() == "Linux" if have_tunnel: tunnelArgs = parser.add_argument_group('Tunnel', 'Arguments related to establishing a tunnel device over the mesh.')