Merge 5aeed3c670
into 57f55bbdd5
This commit is contained in:
commit
a41c124550
@ -73,7 +73,10 @@ var waterfall_min_level_default;
|
||||
var waterfall_max_level_default;
|
||||
var waterfall_colors = buildWaterfallColors(['#000', '#FFF']);
|
||||
var waterfall_auto_levels;
|
||||
var waterfall_auto_level_default_mode;
|
||||
var waterfall_auto_min_range;
|
||||
var waterfall_measure_minmax_now = false;
|
||||
var waterfall_measure_minmax_continuous = false;
|
||||
|
||||
function buildWaterfallColors(input) {
|
||||
return chroma.scale(input).colors(256, 'rgb')
|
||||
@ -733,6 +736,12 @@ function on_ws_recv(evt) {
|
||||
waterfall_auto_levels = config['waterfall_auto_levels'];
|
||||
if ('waterfall_auto_min_range' in config)
|
||||
waterfall_auto_min_range = config['waterfall_auto_min_range'];
|
||||
if ('waterfall_auto_level_default_mode' in config)
|
||||
waterfall_measure_minmax_continuous = waterfall_auto_level_default_mode = config['waterfall_auto_level_default_mode'];
|
||||
var waterfallAutoButton = $('#openwebrx-waterfall-colors-auto');
|
||||
waterfallAutoButton[waterfall_measure_minmax_continuous ? 'addClass' : 'removeClass']('highlighted');
|
||||
$('#openwebrx-waterfall-color-min, #openwebrx-waterfall-color-max').prop('disabled', waterfall_measure_minmax_continuous);
|
||||
|
||||
waterfallColorsDefault();
|
||||
|
||||
var initial_demodulator_params = {};
|
||||
@ -939,9 +948,6 @@ function on_ws_recv(evt) {
|
||||
}
|
||||
}
|
||||
|
||||
var waterfall_measure_minmax_now = false;
|
||||
var waterfall_measure_minmax_continuous = false;
|
||||
|
||||
function waterfall_measure_minmax_do(what) {
|
||||
// Get visible range
|
||||
var range = get_visible_freq_range();
|
||||
|
@ -142,6 +142,7 @@ defaultConfig = PropertyLayer(
|
||||
waterfall_scheme="GoogleTurboWaterfall",
|
||||
waterfall_levels=PropertyLayer(min=-88, max=-20),
|
||||
waterfall_auto_levels=PropertyLayer(min=3, max=10),
|
||||
waterfall_auto_level_default_mode=False,
|
||||
waterfall_auto_min_range=50,
|
||||
tuning_precision=2,
|
||||
squelch_auto_margin=10,
|
||||
|
@ -130,6 +130,7 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
|
||||
"waterfall_scheme",
|
||||
"waterfall_colors",
|
||||
"waterfall_auto_levels",
|
||||
"waterfall_auto_level_default_mode",
|
||||
"waterfall_auto_min_range",
|
||||
"fft_size",
|
||||
"audio_compression",
|
||||
|
@ -2,6 +2,7 @@ from owrx.controllers.settings import SettingsFormController
|
||||
from owrx.form.section import Section
|
||||
from owrx.config.core import CoreConfig
|
||||
from owrx.form.input import (
|
||||
CheckboxInput,
|
||||
TextInput,
|
||||
NumberInput,
|
||||
FloatInput,
|
||||
@ -117,6 +118,11 @@ class GeneralSettingsController(SettingsFormController):
|
||||
infotext="Specifies the upper and lower dynamic headroom that should be added when automatically "
|
||||
+ "adjusting waterfall colors",
|
||||
),
|
||||
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."
|
||||
),
|
||||
NumberInput(
|
||||
"waterfall_auto_min_range",
|
||||
"Automatic adjustment minimum range",
|
||||
|
Loading…
Reference in New Issue
Block a user