add source for rf103 (experimental)

This commit is contained in:
Jakob Ketterl 2020-10-25 16:53:18 +01:00
parent e6a04aa5e9
commit dc03639cad
3 changed files with 20 additions and 1 deletions

View File

@ -76,4 +76,4 @@ class Option(CommandMapping):
class Argument(CommandMapping):
def map(self, value):
return value
return str(value)

View File

@ -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")

15
owrx/source/rf103.py Normal file
View File

@ -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)