openwebrx-clone/owrx/source/rtl_sdr_soapy.py

29 lines
1010 B
Python
Raw Normal View History

2021-02-20 18:09:24 +01:00
from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription
2021-04-29 15:17:21 +02:00
from owrx.form.input import Input
from owrx.form.input.device import BiasTeeInput, DirectSamplingInput
from typing import List
class RtlSdrSoapySource(SoapyConnectorSource):
def getSoapySettingsMappings(self):
mappings = super().getSoapySettingsMappings()
mappings.update({"direct_sampling": "direct_samp", "bias_tee": "biastee"})
return mappings
2020-01-10 20:50:56 +01:00
def getDriver(self):
return "rtlsdr"
2021-02-20 18:09:24 +01:00
class RtlSdrSoapyDeviceDescription(SoapyConnectorDeviceDescription):
def getName(self):
return "RTL-SDR device (via SoapySDR)"
def getInputs(self) -> List[Input]:
return super().getInputs() + [BiasTeeInput(), DirectSamplingInput()]
def getDeviceOptionalKeys(self):
return super().getDeviceOptionalKeys() + ["bias_tee", "direct_sampling"]
2021-02-23 18:32:23 +01:00
def getProfileOptionalKeys(self):
return super().getProfileOptionalKeys() + ["bias_tee", "direct_sampling"]