diff options
author | pux <pux@pux.dom> | 2020-12-19 21:06:20 +0100 |
---|---|---|
committer | pux <pux@pux.dom> | 2020-12-19 21:06:20 +0100 |
commit | 234483432c89afcd2b7c4a6259507df1fefba860 (patch) | |
tree | 5a5ddec996a0eeba3977d60022332a215b667bbb | |
parent | 8ef04659aa59819ba3a57d599fe3e294e515a6e0 (diff) | |
download | calctenna-234483432c89afcd2b7c4a6259507df1fefba860.tar.gz calctenna-234483432c89afcd2b7c4a6259507df1fefba860.tar.bz2 calctenna-234483432c89afcd2b7c4a6259507df1fefba860.zip |
remove default frequency, make sure people understand that -f is needed
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | calctenna.py | 9 |
2 files changed, 8 insertions, 3 deletions
@@ -8,7 +8,7 @@ usage: calctenna.py [-h] [-f [frequency]] [-V [velocity_factor]] [-q] optional arguments: -h, --help show this help message and exit -f [frequency], --frequency [frequency] - desired frequency in Hz + desired frequency in Hz (e.g. 144800000 or 433e6, ... -V [velocity_factor], --velocity-factor [velocity_factor] -q, --quiet print only result ``` diff --git a/calctenna.py b/calctenna.py index c4670c1..79d6ce1 100755 --- a/calctenna.py +++ b/calctenna.py @@ -12,10 +12,11 @@ def run_argparse(): argparser.add_argument( '-f', '--frequency', + required=True, metavar='frequency', - help='desired frequency in Hz', + help='desired frequency in Hz (e.g. 144800000 or 433e6, ...', nargs='?', - default='100e6' + #default='100e6' ) argparser.add_argument( '-V', @@ -32,6 +33,10 @@ def run_argparse(): ) args = argparser.parse_args() + if not args.frequency: + argparser.print_usage() + exit() + return args def calc(args): |