From 5e3e0233a78e0db0f044d2b8c8994d1c033be0ca Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Thu, 25 Aug 2022 18:22:54 -0400 Subject: [PATCH] Added range validation wherever possible. --- owrx/source/sdrplay.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/owrx/source/sdrplay.py b/owrx/source/sdrplay.py index fb89b18..a30186b 100644 --- a/owrx/source/sdrplay.py +++ b/owrx/source/sdrplay.py @@ -1,6 +1,7 @@ from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription from owrx.form.input import Input, CheckboxInput, DropdownInput, NumberInput, DropdownEnum from owrx.form.input.device import BiasTeeInput, GainInput +from owrx.form.input.validator import RangeValidator from typing import List @@ -57,11 +58,13 @@ class SdrplayDeviceDescription(SoapyConnectorDeviceDescription): NumberInput( "rfgain_sel", "RF gain reduction", + validator=RangeValidator(0, 32), ), NumberInput( "agc_setpoint", "AGC setpoint", append="dBFS", + validator=RangeValidator(-60, 0), ), GainInput( "rf_gain",