Added range validation wherever possible.
This commit is contained in:
parent
f7cb9b1b1f
commit
5e3e0233a7
@ -1,6 +1,7 @@
|
|||||||
from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription
|
from owrx.source.soapy import SoapyConnectorSource, SoapyConnectorDeviceDescription
|
||||||
from owrx.form.input import Input, CheckboxInput, DropdownInput, NumberInput, DropdownEnum
|
from owrx.form.input import Input, CheckboxInput, DropdownInput, NumberInput, DropdownEnum
|
||||||
from owrx.form.input.device import BiasTeeInput, GainInput
|
from owrx.form.input.device import BiasTeeInput, GainInput
|
||||||
|
from owrx.form.input.validator import RangeValidator
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
||||||
@ -57,11 +58,13 @@ class SdrplayDeviceDescription(SoapyConnectorDeviceDescription):
|
|||||||
NumberInput(
|
NumberInput(
|
||||||
"rfgain_sel",
|
"rfgain_sel",
|
||||||
"RF gain reduction",
|
"RF gain reduction",
|
||||||
|
validator=RangeValidator(0, 32),
|
||||||
),
|
),
|
||||||
NumberInput(
|
NumberInput(
|
||||||
"agc_setpoint",
|
"agc_setpoint",
|
||||||
"AGC setpoint",
|
"AGC setpoint",
|
||||||
append="dBFS",
|
append="dBFS",
|
||||||
|
validator=RangeValidator(-60, 0),
|
||||||
),
|
),
|
||||||
GainInput(
|
GainInput(
|
||||||
"rf_gain",
|
"rf_gain",
|
||||||
|
Loading…
Reference in New Issue
Block a user