reset initial demodulator params on reconnects

This commit is contained in:
Jakob Ketterl 2021-04-27 23:13:44 +02:00
parent c6e01eed1a
commit a7e2aae292
2 changed files with 7 additions and 1 deletions

View File

@ -213,6 +213,10 @@ DemodulatorPanel.prototype.setInitialParams = function(params) {
$.extend(this.initialParams, params); $.extend(this.initialParams, params);
}; };
DemodulatorPanel.prototype.resetInitialParams = function() {
this.initialParams = {};
};
DemodulatorPanel.prototype.onHashChange = function() { DemodulatorPanel.prototype.onHashChange = function() {
this._apply(this.transformHashParams(this.parseHash())); this._apply(this.transformHashParams(this.parseHash()));
}; };

View File

@ -1006,7 +1006,9 @@ function onAudioStart(apiType){
var reconnect_timeout = false; var reconnect_timeout = false;
function on_ws_closed() { function on_ws_closed() {
$("#openwebrx-panel-receiver").demodulatorPanel().stopDemodulator(); var demodulatorPanel = $("#openwebrx-panel-receiver").demodulatorPanel();
demodulatorPanel.stopDemodulator();
demodulatorPanel.resetInitialParams();
if (reconnect_timeout) { if (reconnect_timeout) {
// max value: roundabout 8 and a half minutes // max value: roundabout 8 and a half minutes
reconnect_timeout = Math.min(reconnect_timeout * 2, 512000); reconnect_timeout = Math.min(reconnect_timeout * 2, 512000);