diff --git a/owrx/command.py b/owrx/command.py index 87ae711..0559b72 100644 --- a/owrx/command.py +++ b/owrx/command.py @@ -76,4 +76,4 @@ class Option(CommandMapping): class Argument(CommandMapping): def map(self, value): - return value + return str(value) diff --git a/owrx/feature.py b/owrx/feature.py index c3d7259..88cf6fb 100644 --- a/owrx/feature.py +++ b/owrx/feature.py @@ -68,6 +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"], # optional features and their requirements "digital_voice_digiham": ["digiham", "sox"], "digital_voice_dsd": ["dsd", "sox", "digiham"], @@ -492,3 +493,6 @@ class FeatureDetector(object): [OpenWebRX wiki](https://github.com/jketterl/openwebrx/wiki/DRM-demodulator-notes). """ return self.command_is_runnable("dream --help", 0) + + def has_rf103_sdr(self): + return self.command_is_runnable("rf103_sdr") diff --git a/owrx/source/rf103.py b/owrx/source/rf103.py new file mode 100644 index 0000000..db06d23 --- /dev/null +++ b/owrx/source/rf103.py @@ -0,0 +1,15 @@ +from owrx.source.direct import DirectSource +from owrx.command import Option +import time + + +class Rf103Source(DirectSource): + 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)