Added range check to the FFT overlap parameter

This commit is contained in:
Marat Fayzullin 2024-08-24 13:30:51 -04:00
parent 6dc5742e30
commit c794ad433b
5 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
**1.2.67**
- Added keyboard shortcuts (press [?] for help).
- Added range check to the FFT overlap parameter.
**1.2.66**
- Added bookmark option to enable/disable scanning.

1
debian/changelog vendored
View File

@ -1,6 +1,7 @@
openwebrx (1.2.67) bullseye jammy; urgency=low
* Added keyboard shortcuts (press [?] for help).
* Added range check to the FFT overlap parameter.
-- Marat Fayzullin <luarvique@gmail.com> Mon, 26 Aug 2024 16:12:00 +0000

View File

@ -161,6 +161,7 @@ class GeneralSettingsController(SettingsFormController):
"FFT vertical overlap factor",
infotext="If fft_voverlap_factor is above 0, multiple FFTs will be used for creating a line on the "
+ "diagram.",
validator=RangeValidator(0.0, 0.9),
),
WaterfallLevelsInput("waterfall_levels", "Waterfall levels"),
WaterfallAutoLevelsInput(

View File

@ -161,8 +161,8 @@ class NumberInput(Input):
class FloatInput(NumberInput):
def __init__(self, id, label, infotext=None, converter: Converter = None):
super().__init__(id, label, infotext, converter=converter)
def __init__(self, id, label, infotext=None, converter: Converter = None, validator: Validator = None):
super().__init__(id, label, infotext, converter=converter, validator=validator)
self.step = "any"
def defaultConverter(self):

View File

@ -16,7 +16,7 @@ class RequiredValidator(Validator):
class Range(object):
def __init__(self, start: int, end: int = None):
def __init__(self, start, end = None):
self.start = start
self.end = end if end is not None else start