diff --git a/owrx/source/sdrplay.py b/owrx/source/sdrplay.py index ecd7bcf7..7a29dfb0 100644 --- a/owrx/source/sdrplay.py +++ b/owrx/source/sdrplay.py @@ -1,5 +1,5 @@ from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription -from owrx.form.input import Input, CheckboxInput, DropdownInput, DropdownEnum +from owrx.form.input import Input, CheckboxInput from owrx.form.input.device import BiasTeeInput from owrx.form.input.validator import Range from typing import List @@ -13,8 +13,8 @@ class SdrplaySource(SoapyConnectorSource): "bias_tee": "biasT_ctrl", "rf_notch": "rfnotch_ctrl", "dab_notch": "dabnotch_ctrl", - "if_mode": "if_mode", "external_reference": "extref_ctrl", + "hdr_ctrl": "hdr_ctrl", } ) return mappings @@ -23,16 +23,6 @@ class SdrplaySource(SoapyConnectorSource): return "sdrplay" -class IfModeOptions(DropdownEnum): - IFMODE_ZERO_IF = "Zero-IF" - IFMODE_450 = "450kHz" - IFMODE_1620 = "1620kHz" - IFMODE_2048 = "2048kHz" - - def __str__(self): - return self.value - - class SdrplayDeviceDescription(SoapyConnectorDeviceDescription): def getName(self): return "SDRPlay device (RSP1, RSP2, RSPDuo, RSPDx)" @@ -51,18 +41,25 @@ class SdrplayDeviceDescription(SoapyConnectorDeviceDescription): "dab_notch", "Enable DAB notch filter", ), - DropdownInput( - "if_mode", - "IF Mode", - IfModeOptions, + CheckboxInput( + "external_reference", + "Enable external reference clock", ), + CheckboxInput( + "hdr_ctrl", + "Enable RSPdx HDR mode", + ) ] def getDeviceOptionalKeys(self): - return super().getDeviceOptionalKeys() + ["bias_tee", "rf_notch", "dab_notch", "if_mode"] + return super().getDeviceOptionalKeys() + [ + "bias_tee", "rf_notch", "dab_notch", "external_reference", "hdr_ctrl" + ] def getProfileOptionalKeys(self): - return super().getProfileOptionalKeys() + ["bias_tee", "rf_notch", "dab_notch", "if_mode"] + return super().getProfileOptionalKeys() + [ + "bias_tee", "rf_notch", "dab_notch", "external_reference", "hdr_ctrl" + ] def getSampleRateRanges(self) -> list[Range]: # this is from SoapySDRPlay3's implementation of listSampleRates().