2021-02-20 18:09:24 +01:00
|
|
|
from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription
|
2021-02-20 18:48:12 +01:00
|
|
|
from owrx.form import Input
|
|
|
|
from owrx.form.device import BiasTeeInput, DirectSamplingInput
|
|
|
|
from typing import List
|
2020-01-10 20:43:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
class RtlSdrSoapySource(SoapyConnectorSource):
|
2020-03-14 01:04:52 +01:00
|
|
|
def getSoapySettingsMappings(self):
|
|
|
|
mappings = super().getSoapySettingsMappings()
|
2020-03-14 23:06:52 +01:00
|
|
|
mappings.update({"direct_sampling": "direct_samp", "bias_tee": "biastee"})
|
2020-03-14 01:04:52 +01:00
|
|
|
return mappings
|
2020-01-10 20:50:56 +01:00
|
|
|
|
2020-01-10 20:43:28 +01:00
|
|
|
def getDriver(self):
|
|
|
|
return "rtlsdr"
|
2021-02-20 18:09:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
class RtlSdrSoapyDeviceDescription(SoapyConnectorDeviceDescription):
|
2021-02-20 18:48:12 +01:00
|
|
|
def getInputs(self) -> List[Input]:
|
|
|
|
return self.mergeInputs(super().getInputs(), [BiasTeeInput(), DirectSamplingInput()])
|