mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-01-05 00:00:43 +01:00
add preliminary support for netsdr devices
This commit is contained in:
parent
32aeebd7a3
commit
44ca186c80
|
|
@ -70,6 +70,7 @@ class FeatureDetector(object):
|
|||
"radioberry": ["soapy_connector", "soapy_radioberry"],
|
||||
"fcdpp": ["soapy_connector", "soapy_fcdpp"],
|
||||
"bladerf": ["soapy_connector", "soapy_bladerf"],
|
||||
"netsdr": ["soapy_connector", "soapy_netsdr"],
|
||||
"sddc": ["sddc_connector"],
|
||||
"hpsdr": ["hpsdr_connector"],
|
||||
"runds": ["runds_connector"],
|
||||
|
|
@ -417,6 +418,14 @@ class FeatureDetector(object):
|
|||
"""
|
||||
return self._has_soapy_driver("bladerf")
|
||||
|
||||
def has_soapy_netsdr(self):
|
||||
"""
|
||||
The SoapyNetSDR module allows the use of devices using the NetSDR protocol.
|
||||
|
||||
You can get it [here](https://github.com/pothosware/SoapyNetSDR)
|
||||
"""
|
||||
return self._has_soapy_driver("netsdr")
|
||||
|
||||
def has_m17_demod(self):
|
||||
"""
|
||||
The `m17-demod` tool is used to demodulate M17 digital voice signals.
|
||||
|
|
|
|||
30
owrx/source/netsdr.py
Normal file
30
owrx/source/netsdr.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription
|
||||
from owrx.form.input import Input
|
||||
from owrx.form.input.device import RemoteInput
|
||||
from typing import List
|
||||
|
||||
|
||||
class NetsdrSource(SoapyConnectorSource):
|
||||
def getEventNames(self):
|
||||
return super().getEventNames() + ["remote"]
|
||||
|
||||
def buildSoapyDeviceParameters(self, parsed, values):
|
||||
params = super().buildSoapyDeviceParameters(parsed, values)
|
||||
params += [{"netsdr": values["remote"]}]
|
||||
return params
|
||||
|
||||
def getDriver(self):
|
||||
return "netsdr"
|
||||
|
||||
|
||||
class NetsdrDeviceDescription(SoapyConnectorDeviceDescription):
|
||||
def getName(self):
|
||||
return "NetSDR device"
|
||||
|
||||
def getInputs(self) -> List[Input]:
|
||||
return super().getInputs() + [
|
||||
RemoteInput()
|
||||
]
|
||||
|
||||
def getDeviceMandatoryKeys(self):
|
||||
return super().getDeviceMandatoryKeys() + ["remote"]
|
||||
Loading…
Reference in a new issue