implement minimum waterfall range
This commit is contained in:
parent
36cf6097b3
commit
9f9a5ceaa3
@ -262,7 +262,7 @@ waterfall_colors = [0x30123bff, 0x311542ff, 0x33184aff, 0x341b51ff, 0x351e58ff,
|
|||||||
|
|
||||||
waterfall_min_level = -88 # in dB
|
waterfall_min_level = -88 # in dB
|
||||||
waterfall_max_level = -20
|
waterfall_max_level = -20
|
||||||
waterfall_auto_level_margin = {"min": 5, "max": 10}
|
waterfall_auto_level_margin = {"min": 3, "max": 10, "min_range": 50}
|
||||||
|
|
||||||
# Note: When the auto waterfall level button is clicked, the following happens:
|
# Note: When the auto waterfall level button is clicked, the following happens:
|
||||||
# [waterfall_min_level] = [current_min_power_level] - [waterfall_auto_level_margin["min"]]
|
# [waterfall_min_level] = [current_min_power_level] - [waterfall_auto_level_margin["min"]]
|
||||||
|
@ -104,8 +104,11 @@ function waterfallColorsDefault() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function waterfallColorsAuto(levels) {
|
function waterfallColorsAuto(levels) {
|
||||||
$("#openwebrx-waterfall-color-min").val(levels.min - waterfall_auto_level_margin.min);
|
var min_level = levels.min - waterfall_auto_level_margin.min;
|
||||||
$("#openwebrx-waterfall-color-max").val(levels.max + waterfall_auto_level_margin.max);
|
$("#openwebrx-waterfall-color-min").val(min_level);
|
||||||
|
var max_level = levels.max + waterfall_auto_level_margin.max;
|
||||||
|
max_level = Math.max(min_level + (waterfall_auto_level_margin.min_range || 0), max_level);
|
||||||
|
$("#openwebrx-waterfall-color-max").val(max_level);
|
||||||
updateWaterfallColors(0);
|
updateWaterfallColors(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user