Merge branch 'develop' into rf103

This commit is contained in:
Jakob Ketterl 2020-11-12 18:01:59 +01:00
commit 529e9c3c60
7 changed files with 24 additions and 4 deletions

View File

@ -1,4 +1,5 @@
**unreleased** **unreleased**
- Introduced `squelch_auto_margin` config option that allows configuring the auto squelch level
**0.20.0** **0.20.0**
- Added the ability to sign multiple keys in a single request, thus enabling multiple users to claim a single receiver - Added the ability to sign multiple keys in a single request, thus enabling multiple users to claim a single receiver

View File

@ -279,6 +279,11 @@ waterfall_auto_level_margin = {"min": 3, "max": 10, "min_range": 50}
# \_waterfall_auto_level_margin["min"]_/ |__ current_min_power_level | \_waterfall_auto_level_margin["max"]_/ # \_waterfall_auto_level_margin["min"]_/ |__ current_min_power_level | \_waterfall_auto_level_margin["max"]_/
# current_max_power_level __| # current_max_power_level __|
# This setting tells the auto-squelch the offset to add to the current signal level to use as the new squelch level.
# Lowering this setting will give you a more sensitive squelch, but it may also cause unwanted squelch openings when
# using the auto squelch.
squelch_auto_margin = 10 # in dB
# === Experimental settings === # === Experimental settings ===
# Warning! The settings below are very experimental. # Warning! The settings below are very experimental.
csdr_dynamic_bufsize = False # This allows you to change the buffering mode of csdr. csdr_dynamic_bufsize = False # This allows you to change the buffering mode of csdr.

2
debian/changelog vendored
View File

@ -1,4 +1,6 @@
openwebrx (0.21.0) UNRELEASED; urgency=low openwebrx (0.21.0) UNRELEASED; urgency=low
* Introduced `squelch_auto_margin` config option that allows configuring the
auto squelch level
-- Jakob Ketterl <jakob.ketterl@gmx.de> Sun, 11 Oct 2020 21:12:00 +0000 -- Jakob Ketterl <jakob.ketterl@gmx.de> Sun, 11 Oct 2020 21:12:00 +0000

View File

@ -168,7 +168,7 @@
<input title="Waterfall minimum level" id="openwebrx-waterfall-color-min" class="openwebrx-panel-slider" type="range" min="-200" max="100" value="50" step="1" onchange="updateWaterfallColors(0);" oninput="updateVolume()"> <input title="Waterfall minimum level" id="openwebrx-waterfall-color-min" class="openwebrx-panel-slider" type="range" min="-200" max="100" value="50" step="1" onchange="updateWaterfallColors(0);" oninput="updateVolume()">
</div> </div>
<div class="openwebrx-panel-line"> <div class="openwebrx-panel-line">
<div title="Auto-set squelch level" class="openwebrx-squelch-default openwebrx-button"><span class="sprite sprite-squelch openwebrx-sliderbtn-img"></span></div> <div title="Auto-set squelch level" class="openwebrx-squelch-auto openwebrx-button"><span class="sprite sprite-squelch openwebrx-sliderbtn-img"></span></div>
<input title="Squelch" class="openwebrx-squelch-slider openwebrx-panel-slider" type="range" min="-150" max="0" value="-150" step="1"> <input title="Squelch" class="openwebrx-squelch-slider openwebrx-panel-slider" type="range" min="-150" max="0" value="-150" step="1">
<div title="Set waterfall colors to default" id="openwebrx-waterfall-colors-default" class="openwebrx-button" onclick="waterfallColorsDefault()"><span class="sprite sprite-waterfall-default openwebrx-sliderbtn-img"></span></div> <div title="Set waterfall colors to default" id="openwebrx-waterfall-colors-default" class="openwebrx-button" onclick="waterfallColorsDefault()"><span class="sprite sprite-waterfall-default openwebrx-sliderbtn-img"></span></div>
<input title="Waterfall maximum level" id="openwebrx-waterfall-color-max" class="openwebrx-panel-slider" type="range" min="-200" max="100" value="50" step="1" onchange="updateWaterfallColors(1);" oninput="updateVolume()"> <input title="Waterfall maximum level" id="openwebrx-waterfall-color-max" class="openwebrx-panel-slider" type="range" min="-200" max="100" value="50" step="1" onchange="updateWaterfallColors(1);" oninput="updateVolume()">

View File

@ -3,6 +3,7 @@ function DemodulatorPanel(el) {
self.el = el; self.el = el;
self.demodulator = null; self.demodulator = null;
self.mode = null; self.mode = null;
self.squelchMargin = 10;
var displayEl = el.find('.webrx-actual-freq') var displayEl = el.find('.webrx-actual-freq')
this.tuneableFrequencyDisplay = displayEl.tuneableFrequencyDisplay(); this.tuneableFrequencyDisplay = displayEl.tuneableFrequencyDisplay();
@ -27,9 +28,9 @@ function DemodulatorPanel(el) {
self.setMode(value); self.setMode(value);
} }
}); });
el.on('click', '.openwebrx-squelch-default', function() { el.on('click', '.openwebrx-squelch-auto', function() {
if (!self.squelchAvailable()) return; if (!self.squelchAvailable()) return;
el.find('.openwebrx-squelch-slider').val(getLogSmeterValue(smeter_level) + 10); el.find('.openwebrx-squelch-slider').val(getLogSmeterValue(smeter_level) + self.getSquelchMargin());
self.updateSquelch(); self.updateSquelch();
}); });
el.on('change', '.openwebrx-squelch-slider', function() { el.on('change', '.openwebrx-squelch-slider', function() {
@ -247,7 +248,7 @@ DemodulatorPanel.prototype.updateButtons = function() {
} }
var squelch_disabled = !this.squelchAvailable(); var squelch_disabled = !this.squelchAvailable();
this.el.find('.openwebrx-squelch-slider').prop('disabled', squelch_disabled); this.el.find('.openwebrx-squelch-slider').prop('disabled', squelch_disabled);
this.el.find('.openwebrx-squelch-default')[squelch_disabled ? 'addClass' : 'removeClass']('disabled'); this.el.find('.openwebrx-squelch-auto')[squelch_disabled ? 'addClass' : 'removeClass']('disabled');
} }
DemodulatorPanel.prototype.setCenterFrequency = function(center_freq) { DemodulatorPanel.prototype.setCenterFrequency = function(center_freq) {
@ -322,6 +323,15 @@ DemodulatorPanel.prototype.updateSquelch = function() {
if (demod) demod.setSquelch(sliderValue); if (demod) demod.setSquelch(sliderValue);
}; };
DemodulatorPanel.prototype.setSquelchMargin = function(margin) {
if (!margin || this.squelchMargin == margin) return;
this.squelchMargin = margin;
};
DemodulatorPanel.prototype.getSquelchMargin = function() {
return this.squelchMargin;
};
$.fn.demodulatorPanel = function(){ $.fn.demodulatorPanel = function(){
if (!this.data('panel')) { if (!this.data('panel')) {
this.data('panel', new DemodulatorPanel(this)); this.data('panel', new DemodulatorPanel(this));

View File

@ -726,6 +726,7 @@ function on_ws_recv(evt) {
var demodulatorPanel = $('#openwebrx-panel-receiver').demodulatorPanel(); var demodulatorPanel = $('#openwebrx-panel-receiver').demodulatorPanel();
demodulatorPanel.setCenterFrequency(center_freq); demodulatorPanel.setCenterFrequency(center_freq);
demodulatorPanel.setInitialParams(initial_demodulator_params); demodulatorPanel.setInitialParams(initial_demodulator_params);
demodulatorPanel.setSquelchMargin(config['squelch_auto_margin']);
bookmarks.loadLocalBookmarks(); bookmarks.loadLocalBookmarks();
waterfall_clear(); waterfall_clear();

View File

@ -123,6 +123,7 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
"center_freq", "center_freq",
"initial_squelch_level", "initial_squelch_level",
"profile_id", "profile_id",
"squelch_auto_margin",
] ]
def __init__(self, conn): def __init__(self, conn):