Adding new gain options available in SoapySDRPlay3.
This commit is contained in:
parent
5cd0847362
commit
11ec294032
@ -1,5 +1,6 @@
|
||||
from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription
|
||||
from owrx.form.input import Input, CheckboxInput, DropdownInput, DropdownEnum
|
||||
from owrx.form.input import Input, CheckboxInput, DropdownInput, NumberInput, DropdownEnum
|
||||
from owrx.form.input.validator import RangeValidator
|
||||
from owrx.form.input.device import BiasTeeInput
|
||||
from typing import List
|
||||
|
||||
@ -14,6 +15,9 @@ class SdrplaySource(SoapyConnectorSource):
|
||||
"dab_notch": "dabnotch_ctrl",
|
||||
"if_mode": "if_mode",
|
||||
"external_reference": "extref_ctrl",
|
||||
"gain_ctrl_mode": "gain_ctrl_mode",
|
||||
"agc_setpoint": "agc_setpoint",
|
||||
"rfgain_sel": "rfgain_sel"
|
||||
}
|
||||
)
|
||||
return mappings
|
||||
@ -32,6 +36,16 @@ class IfModeOptions(DropdownEnum):
|
||||
return self.value
|
||||
|
||||
|
||||
class GainModelOptions(DropdownEnum):
|
||||
GMODEL_LEGACY = "LEGACY"
|
||||
GMODEL_DB = "DB"
|
||||
GMODEL_RFATT = "RFATT"
|
||||
GMODEL_STEPS = "STEPS"
|
||||
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
|
||||
class SdrplayDeviceDescription(SoapyConnectorDeviceDescription):
|
||||
def getName(self):
|
||||
return "SDRPlay device (RSP1, RSP2, RSPDuo, RSPDx)"
|
||||
@ -55,10 +69,26 @@ class SdrplayDeviceDescription(SoapyConnectorDeviceDescription):
|
||||
"IF Mode",
|
||||
IfModeOptions,
|
||||
),
|
||||
DropdownInput(
|
||||
"gain_ctrl_model",
|
||||
"Gain Control Model",
|
||||
GainModelOptions,
|
||||
),
|
||||
NumberInput(
|
||||
"agc_setpoint",
|
||||
"AGC Setpoint",
|
||||
append="dBFS",
|
||||
validator=RangeValidator(-60, 0),
|
||||
),
|
||||
NumberInput(
|
||||
"rfgain_sel",
|
||||
"RF Gain Reduction",
|
||||
validator=RangeValidator(0, 32),
|
||||
),
|
||||
]
|
||||
|
||||
def getDeviceOptionalKeys(self):
|
||||
return super().getDeviceOptionalKeys() + ["bias_tee", "rf_notch", "dab_notch", "if_mode"]
|
||||
return super().getDeviceOptionalKeys() + ["bias_tee", "rf_notch", "dab_notch", "if_mode", "gain_ctrl_mode", "agc_setpoint", "rfgain_sel"]
|
||||
|
||||
def getProfileOptionalKeys(self):
|
||||
return super().getProfileOptionalKeys() + ["bias_tee", "rf_notch", "dab_notch", "if_mode"]
|
||||
return super().getProfileOptionalKeys() + ["bias_tee", "rf_notch", "dab_notch", "if_mode", "gain_ctrl_mode", "agc_setpoint", "rfgain_sel"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user