From b5d56eaec2fc754a1df9909d0e8fcee0de025134 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Fri, 27 Nov 2020 18:39:10 +0100 Subject: [PATCH] update to use new sddc_connector --- owrx/feature.py | 6 +++--- owrx/source/rf103.py | 15 +++------------ 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/owrx/feature.py b/owrx/feature.py index 867f510..cd4d02e 100644 --- a/owrx/feature.py +++ b/owrx/feature.py @@ -68,7 +68,7 @@ class FeatureDetector(object): "red_pitaya": ["soapy_connector", "soapy_red_pitaya"], "radioberry": ["soapy_connector", "soapy_radioberry"], "fcdpp": ["soapy_connector", "soapy_fcdpp"], - "rf103": ["rf103_sdr"], + "rf103": ["sddc_connector"], "hpsdr": ["hpsdr_connector"], # optional features and their requirements "digital_voice_digiham": ["digiham", "sox"], @@ -495,8 +495,8 @@ class FeatureDetector(object): """ return self.command_is_runnable("dream --help", 0) - def has_rf103_sdr(self): - return self.command_is_runnable("rf103_sdr") + def has_sddc_connector(self): + return self.command_is_runnable("sddc_connector") def has_hpsdr_connector(self): """ diff --git a/owrx/source/rf103.py b/owrx/source/rf103.py index db06d23..e263250 100644 --- a/owrx/source/rf103.py +++ b/owrx/source/rf103.py @@ -1,15 +1,6 @@ -from owrx.source.direct import DirectSource -from owrx.command import Option -import time +from owrx.source.connector import ConnectorSource -class Rf103Source(DirectSource): +class Rf103Source(ConnectorSource): def getCommandMapper(self): - return super().getCommandMapper().setBase("rf103_sdr -i /home/jakob/workspace/RF103/rx888.img").setMappings({ - "samp_rate": Option("-s"), - "center_freq": Option("-f"), - "attenuation": Option("-a"), - }) - - def sleepOnRestart(self): - time.sleep(1) + return super().getCommandMapper().setBase("sddc_connector")