disable PPM input for devices that don't support it
This commit is contained in:
parent
fe7f2317de
commit
35ad4712bb
@ -514,6 +514,14 @@ class SdrDeviceDescription(object):
|
||||
"""
|
||||
return None
|
||||
|
||||
def supportsPpm(self):
|
||||
"""
|
||||
can be overridden if the device does not support configuring PPM correction
|
||||
|
||||
:return: bool
|
||||
"""
|
||||
return True
|
||||
|
||||
def getDeviceInputs(self) -> List[Input]:
|
||||
keys = self.getDeviceMandatoryKeys() + self.getDeviceOptionalKeys()
|
||||
return [TextInput("name", "Device name", validator=RequiredValidator())] + [
|
||||
@ -568,8 +576,7 @@ class SdrDeviceDescription(object):
|
||||
return ["name", "enabled"]
|
||||
|
||||
def getDeviceOptionalKeys(self):
|
||||
return [
|
||||
"ppm",
|
||||
keys = [
|
||||
"always-on",
|
||||
"services",
|
||||
"rf_gain",
|
||||
@ -577,6 +584,9 @@ class SdrDeviceDescription(object):
|
||||
"waterfall_levels",
|
||||
"scheduler",
|
||||
]
|
||||
if self.supportsPpm():
|
||||
keys += ["ppm"]
|
||||
return keys
|
||||
|
||||
def getProfileMandatoryKeys(self):
|
||||
return ["name", "center_freq", "samp_rate", "start_freq", "start_mod"]
|
||||
|
@ -23,6 +23,12 @@ class AirspyDeviceDescription(SoapyConnectorDeviceDescription):
|
||||
def getName(self):
|
||||
return "Airspy R2 or Mini"
|
||||
|
||||
def supportsPpm(self):
|
||||
# not supported by the device API
|
||||
# frequency calibration can be done with separate tools and will be persisted on the device.
|
||||
# see discussion here: https://groups.io/g/openwebrx/topic/79360293
|
||||
return False
|
||||
|
||||
def getInputs(self) -> List[Input]:
|
||||
return super().getInputs() + [
|
||||
BiasTeeInput(),
|
||||
|
@ -9,3 +9,7 @@ class AirspyhfSource(SoapyConnectorSource):
|
||||
class AirspyhfDeviceDescription(SoapyConnectorDeviceDescription):
|
||||
def getName(self):
|
||||
return "Airspy HF+ or Discovery"
|
||||
|
||||
def supportsPpm(self):
|
||||
# not currently supported by the SoapySDR module.
|
||||
return False
|
||||
|
@ -45,3 +45,7 @@ class FifiSdrSource(DirectSource):
|
||||
class FifiSdrDeviceDescription(DirectSourceDeviceDescription):
|
||||
def getName(self):
|
||||
return "FiFi SDR"
|
||||
|
||||
def supportsPpm(self):
|
||||
# not currently mapped, and it's unclear how this should be sent to the device
|
||||
return False
|
||||
|
@ -18,6 +18,11 @@ class HackrfDeviceDescription(SoapyConnectorDeviceDescription):
|
||||
def getName(self):
|
||||
return "HackRF"
|
||||
|
||||
def supportsPpm(self):
|
||||
# not implemented by the SoapySDR module.
|
||||
# see discussion here: https://groups.io/g/openwebrx/topic/78339109
|
||||
return False
|
||||
|
||||
def getInputs(self) -> List[Input]:
|
||||
return super().getInputs() + [BiasTeeInput()]
|
||||
|
||||
|
@ -53,6 +53,10 @@ class PerseussdrDeviceDescription(DirectSourceDeviceDescription):
|
||||
def getName(self):
|
||||
return "Perseus SDR"
|
||||
|
||||
def supportsPpm(self):
|
||||
# not currently mapped, and not available as an option to "perseustest"
|
||||
return False
|
||||
|
||||
def getInputs(self) -> List[Input]:
|
||||
return super().getInputs() + [
|
||||
DropdownInput("attenuator", "Attenuator", options=AttenuatorOptions),
|
||||
|
@ -40,6 +40,10 @@ class RundsDeviceDescription(ConnectorDeviceDescription):
|
||||
def getName(self):
|
||||
return "R&S device using EB200 or Ammos protocol"
|
||||
|
||||
def supportsPpm(self):
|
||||
# currently not implemented in the connector
|
||||
return False
|
||||
|
||||
def getInputs(self) -> List[Input]:
|
||||
return super().getInputs() + [
|
||||
RemoteInput(),
|
||||
|
Loading…
Reference in New Issue
Block a user