From 3975073efd0ecf001d7d2c30ff6422abe01bc2b7 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 11 Oct 2020 00:25:13 +0200 Subject: [PATCH] defer demodulator startup until center_freq is set --- htdocs/lib/DemodulatorPanel.js | 2 +- htdocs/openwebrx.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/DemodulatorPanel.js b/htdocs/lib/DemodulatorPanel.js index 3c91fcc..5aa4350 100644 --- a/htdocs/lib/DemodulatorPanel.js +++ b/htdocs/lib/DemodulatorPanel.js @@ -179,7 +179,7 @@ DemodulatorPanel.prototype.collectParams = function() { }; DemodulatorPanel.prototype.startDemodulator = function() { - if (!Modes.initComplete()) return; + if (!Modes.initComplete() || !this.center_freq) return; var params = this.collectParams(); this._apply(params); }; diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index de65e70..c5d094f 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -724,8 +724,8 @@ function on_ws_recv(evt) { waterfall_init(); var demodulatorPanel = $('#openwebrx-panel-receiver').demodulatorPanel(); - demodulatorPanel.setInitialParams(initial_demodulator_params); demodulatorPanel.setCenterFrequency(center_freq); + demodulatorPanel.setInitialParams(initial_demodulator_params); bookmarks.loadLocalBookmarks(); waterfall_clear();