Revert "Using long options wherever applicable, using "=" spacer for them."

This reverts commit 3f3fbdd21c.
This commit is contained in:
Marat Fayzullin 2022-08-11 18:49:14 -04:00
parent 3f3fbdd21c
commit 365b0b2972
5 changed files with 15 additions and 15 deletions

View File

@ -57,7 +57,7 @@ class Flag(CommandMapping):
class Option(CommandMapping): class Option(CommandMapping):
def __init__(self, option): def __init__(self, option):
self.option = option self.option = option
self.spacer = "=" if option.startswith("--") else " " self.spacer = " "
def map(self, value): def map(self, value):
if value is not None: if value is not None:

View File

@ -23,15 +23,15 @@ class ConnectorSource(SdrSource):
.getCommandMapper() .getCommandMapper()
.setMappings( .setMappings(
{ {
"samp_rate": Option("--samplerate"), "samp_rate": Option("-s"),
"tuner_freq": Option("--frequency"), "tuner_freq": Option("-f"),
"port": Option("--port"), "port": Option("-p"),
"controlPort": Option("--control"), "controlPort": Option("-c"),
"device": Option("--device"), "device": Option("-d"),
"iqswap": Flag("--iqswap"), "iqswap": Flag("-i"),
"rtltcp_compat": Option("--rtltcp"), "rtltcp_compat": Option("-r"),
"ppm": Option("--ppm"), "ppm": Option("-P"),
"rf_gain": Option("--gain"), "rf_gain": Option("-g"),
} }
) )
) )

View File

@ -11,7 +11,7 @@ class RtlSdrSource(ConnectorSource):
super() super()
.getCommandMapper() .getCommandMapper()
.setBase("rtl_connector") .setBase("rtl_connector")
.setMappings({"bias_tee": Flag("--biastee"), "direct_sampling": Option("--directsampling")}) .setMappings({"bias_tee": Flag("-b"), "direct_sampling": Option("-e")})
) )

View File

@ -13,8 +13,8 @@ class RtlTcpSource(ConnectorSource):
.setBase("rtl_tcp_connector") .setBase("rtl_tcp_connector")
.setMappings( .setMappings(
{ {
"bias_tee": Flag("--biastee"), "bias_tee": Flag("-b"),
"direct_sampling": Option("--directsampling"), "direct_sampling": Option("-e"),
"remote": Argument(), "remote": Argument(),
} }
) )

View File

@ -15,8 +15,8 @@ class SoapyConnectorSource(ConnectorSource, metaclass=ABCMeta):
.setBase("soapy_connector") .setBase("soapy_connector")
.setMappings( .setMappings(
{ {
"antenna": Option("--antenna"), "antenna": Option("-a"),
"soapy_settings": Option("--settings"), "soapy_settings": Option("-t"),
} }
) )
) )