2020-01-10 19:43:28 +00:00
|
|
|
from .soapy import SoapyConnectorSource
|
2020-01-10 19:50:56 +00:00
|
|
|
from owrx.command import Option
|
2020-01-10 19:43:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
class RtlSdrSoapySource(SoapyConnectorSource):
|
2020-01-10 19:50:56 +00:00
|
|
|
def getCommandMapper(self):
|
|
|
|
return super().getCommandMapper().setMappings({"direct_sampling": Option("-t direct_samp").setSpacer("=")})
|
|
|
|
|
2020-01-10 19:43:28 +00:00
|
|
|
def getDriver(self):
|
|
|
|
return "rtlsdr"
|
2020-01-10 19:50:56 +00:00
|
|
|
|
|
|
|
def getEventNames(self):
|
|
|
|
return super().getEventNames() + ["direct_sampling"]
|
2020-02-27 22:21:00 +00:00
|
|
|
|
|
|
|
def onPropertyChange(self, prop, value):
|
|
|
|
if prop == "direct_sampling":
|
|
|
|
prop = "settings"
|
|
|
|
value = "direct_samp={0}".format(value)
|
|
|
|
super().onPropertyChange(prop, value)
|