openwebrx-clone/owrx/source/soapy_remote.py

18 lines
643 B
Python
Raw Normal View History

2020-02-09 12:59:37 +00:00
from .soapy import SoapyConnectorSource
class SoapyRemoteSource(SoapyConnectorSource):
def getEventNames(self):
return super().getEventNames() + ["remote", "remote_driver"]
def getDriver(self):
return "remote"
def buildSoapyDeviceParameters(self, parsed, values):
params = super().buildSoapyDeviceParameters(parsed, values)
params = [v for v in params if not "remote" in params]
params += [{"remote": values["remote"]}]
if "remote_driver" in values and values["remote_driver"] is not None:
params += [{"remote:driver": values["remote_driver"]}]
return params