From 3f3fbdd21c5da628e56ffd49de0e6bdaddcddd2a Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Thu, 11 Aug 2022 18:41:52 -0400 Subject: [PATCH] Using long options wherever applicable, using "=" spacer for them. --- owrx/command.py | 2 +- owrx/source/connector.py | 18 +++++++++--------- owrx/source/rtl_sdr.py | 2 +- owrx/source/rtl_tcp.py | 4 ++-- owrx/source/soapy.py | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/owrx/command.py b/owrx/command.py index 0559b72..68b5f1b 100644 --- a/owrx/command.py +++ b/owrx/command.py @@ -57,7 +57,7 @@ class Flag(CommandMapping): class Option(CommandMapping): def __init__(self, option): self.option = option - self.spacer = " " + self.spacer = "=" if option.startswith("--") else " " def map(self, value): if value is not None: diff --git a/owrx/source/connector.py b/owrx/source/connector.py index 58c535d..c683f01 100644 --- a/owrx/source/connector.py +++ b/owrx/source/connector.py @@ -23,15 +23,15 @@ class ConnectorSource(SdrSource): .getCommandMapper() .setMappings( { - "samp_rate": Option("-s"), - "tuner_freq": Option("-f"), - "port": Option("-p"), - "controlPort": Option("-c"), - "device": Option("-d"), - "iqswap": Flag("-i"), - "rtltcp_compat": Option("-r"), - "ppm": Option("-P"), - "rf_gain": Option("-g"), + "samp_rate": Option("--samplerate"), + "tuner_freq": Option("--frequency"), + "port": Option("--port"), + "controlPort": Option("--control"), + "device": Option("--device"), + "iqswap": Flag("--iqswap"), + "rtltcp_compat": Option("--rtltcp"), + "ppm": Option("--ppm"), + "rf_gain": Option("--gain"), } ) ) diff --git a/owrx/source/rtl_sdr.py b/owrx/source/rtl_sdr.py index cb9e954..e287e97 100644 --- a/owrx/source/rtl_sdr.py +++ b/owrx/source/rtl_sdr.py @@ -11,7 +11,7 @@ class RtlSdrSource(ConnectorSource): super() .getCommandMapper() .setBase("rtl_connector") - .setMappings({"bias_tee": Flag("-b"), "direct_sampling": Option("-e")}) + .setMappings({"bias_tee": Flag("--biastee"), "direct_sampling": Option("--directsampling")}) ) diff --git a/owrx/source/rtl_tcp.py b/owrx/source/rtl_tcp.py index 6c3f7d2..ff4bb08 100644 --- a/owrx/source/rtl_tcp.py +++ b/owrx/source/rtl_tcp.py @@ -13,8 +13,8 @@ class RtlTcpSource(ConnectorSource): .setBase("rtl_tcp_connector") .setMappings( { - "bias_tee": Flag("-b"), - "direct_sampling": Option("-e"), + "bias_tee": Flag("--biastee"), + "direct_sampling": Option("--directsampling"), "remote": Argument(), } ) diff --git a/owrx/source/soapy.py b/owrx/source/soapy.py index 745343c..b2a1bac 100644 --- a/owrx/source/soapy.py +++ b/owrx/source/soapy.py @@ -15,8 +15,8 @@ class SoapyConnectorSource(ConnectorSource, metaclass=ABCMeta): .setBase("soapy_connector") .setMappings( { - "antenna": Option("-a"), - "soapy_settings": Option("-t"), + "antenna": Option("--antenna"), + "soapy_settings": Option("--settings"), } ) )