break apart the ever-growing owrx/source.py

This commit is contained in:
Jakob Ketterl
2019-12-21 20:58:28 +01:00
parent 5b08dae28d
commit 292fe80acf
20 changed files with 1043 additions and 980 deletions

16
owrx/source/rtl_sdr.py Normal file
View File

@ -0,0 +1,16 @@
from .connector import ConnectorSource
class RtlSdrSource(ConnectorSource):
def getCommand(self):
cmd = (
"rtl_connector -p {port} -c {controlPort}".format(port=self.port, controlPort=self.controlPort)
+ " -s {samp_rate} -f {tuner_freq} -g {rf_gain} -P {ppm}"
)
if "device" in self.rtlProps and self.rtlProps["device"] is not None:
cmd += ' -d "{device}"'
if self.rtlProps["iqswap"]:
cmd += " -i"
if self.rtlProps["rtltcp_compat"]:
cmd += " -r"
return cmd