[chirp_devel] [PATCH 4/9] chirpc: add --list-radios option (#2343)
Zach Welch
Tue Feb 24 23:26:48 PST 2015
# HG changeset patch
# User Zach Welch <zach at mandolincreekfarm.com>
chirpc: add --list-radios option (#2343)
The current list of radios is too long to present to the user in
the --help text, so this splits the list out into its own option.
diff --git a/chirpc b/chirpc
index b4525a7..6a25e50 100755
--- a/chirpc
+++ b/chirpc
@@ -137,8 +137,9 @@ if __name__ == "__main__":
help="Set mode (%s)" % ",".join(chirp_common.MODES))
parser.add_argument("-r", "--radio", dest="radio",
default=None,
- help="Radio model (one of %s)" % ",".join(RADIOS.keys()))
-
+ help="Radio model (see --list-radios)")
+ parser.add_argument("--list-radios", action="store_true",
+ help="List radio models")
parser.add_argument("--mmap", dest="mmap",
default=None,
help="Radio memory map file location")
@@ -159,6 +160,10 @@ if __name__ == "__main__":
options = parser.parse_args()
args = options.args
+ if options.list_radios:
+ print "Supported Radios:\n\t", "\n\t".join(sorted(RADIOS.keys()))
+ sys.exit(0)
+
if options.id:
from chirp import icf
More information about the chirp_devel
mailing list