add the option to configure waterfall auto levels on device and profile

level
This commit is contained in:
Jakob Ketterl 2023-03-17 23:04:15 +01:00
parent 4329025742
commit 5d20157dca
3 changed files with 16 additions and 4 deletions

View file

@ -116,6 +116,7 @@ class OpenWebRxClient(Client, metaclass=ABCMeta):
class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
sdr_config_keys = [
"waterfall_levels",
"waterfall_auto_level_default_mode",
"samp_rate",
"start_mod",
"start_freq",
@ -130,7 +131,6 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
"waterfall_scheme",
"waterfall_colors",
"waterfall_auto_levels",
"waterfall_auto_level_default_mode",
"waterfall_auto_min_range",
"fft_size",
"audio_compression",

View file

@ -120,8 +120,8 @@ class GeneralSettingsController(SettingsFormController):
),
CheckboxInput(
"waterfall_auto_level_default_mode",
'Automatically adjust waterfall level by default',
infotext="Enable this to automatically enable auto adjusting waterfall levels on page load."
"Automatically adjust waterfall level by default",
infotext="Enable this to automatically enable auto adjusting waterfall levels on page load.",
),
NumberInput(
"waterfall_auto_min_range",

View file

@ -615,6 +615,11 @@ class SdrDeviceDescription(object):
+ " device. <br/> Formula: Center frequency + oscillator offset = sdr tune frequency",
),
WaterfallLevelsInput("waterfall_levels", "Waterfall levels"),
CheckboxInput(
"waterfall_auto_level_default_mode",
"Automatically adjust waterfall level by default",
infotext="Enable this to automatically enable auto adjusting waterfall levels on page load.",
),
SchedulerInput("scheduler", "Scheduler"),
ExponentialInput("center_freq", "Center frequency", "Hz"),
ExponentialInput("samp_rate", "Sample rate", "S/s"),
@ -637,6 +642,7 @@ class SdrDeviceDescription(object):
"rf_gain",
"lfo_offset",
"waterfall_levels",
"waterfall_auto_level_default_mode",
"scheduler",
]
if self.supportsPpm():
@ -647,7 +653,13 @@ class SdrDeviceDescription(object):
return ["name", "center_freq", "samp_rate", "start_freq", "start_mod"]
def getProfileOptionalKeys(self):
return ["initial_squelch_level", "rf_gain", "lfo_offset", "waterfall_levels"]
return [
"initial_squelch_level",
"rf_gain",
"lfo_offset",
"waterfall_levels",
"waterfall_auto_level_default_mode",
]
def getDeviceSection(self):
return OptionalSection(