From 0b7143df4a33d5b9752c009ba6df52b58301e2fb Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 18 Dec 2023 09:47:44 +0000 Subject: [PATCH 1/2] better defaults. --- gamutrf/offline.py | 9 +++++---- gamutrf/scan.py | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gamutrf/offline.py b/gamutrf/offline.py index f8f643c8..c2da4d3c 100644 --- a/gamutrf/offline.py +++ b/gamutrf/offline.py @@ -28,17 +28,18 @@ def main(): and k != "filename" and k not in DYNAMIC_EXCLUDE_OPTIONS } + for override_dir in ("inference_output_dir", "sample_dir"): + override_val = getattr(options, override_dir) + if not override: + override_val = out_dir + scan_args[override_dir] = override_val scan_args.update( { "iqtlabs": iqtlabs, "freq_end": 0, "freq_start": freq_start, - "inference_output_dir": getattr( - options, "inference_output_dir", out_dir - ), "pretune": True, "samp_rate": int(meta["sample_rate"]), - "sample_dir": getattr(options, "sample_dir", out_dir), "sdr": "file:" + filename, } ) diff --git a/gamutrf/scan.py b/gamutrf/scan.py index 2fbda7ab..7945379d 100644 --- a/gamutrf/scan.py +++ b/gamutrf/scan.py @@ -152,7 +152,7 @@ def argument_parser(): "--rotate_secs", dest="rotate_secs", type=int, - default=300, + default=0, help="rotate storage directories every N seconds", ) parser.add_argument( @@ -351,7 +351,7 @@ def argument_parser(): parser.add_argument( "--mqtt_server", help="MQTT server to report RSSI", - default="mqtt", + default="", type=str, ) parser.add_argument( From 9ecabf5a866dc2d35f2feb529aacc8e3d6aee1cf Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Mon, 18 Dec 2023 09:53:22 +0000 Subject: [PATCH 2/2] val. --- gamutrf/offline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamutrf/offline.py b/gamutrf/offline.py index c2da4d3c..2592dd46 100644 --- a/gamutrf/offline.py +++ b/gamutrf/offline.py @@ -30,7 +30,7 @@ def main(): } for override_dir in ("inference_output_dir", "sample_dir"): override_val = getattr(options, override_dir) - if not override: + if not override_val: override_val = out_dir scan_args[override_dir] = override_val scan_args.update(