From 2a6a97774d28d227709b19b770f7ef359319115a Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Thu, 4 May 2023 21:10:06 +0200 Subject: [PATCH] fix handling of underlying modulation --- htdocs/lib/DemodulatorPanel.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/htdocs/lib/DemodulatorPanel.js b/htdocs/lib/DemodulatorPanel.js index 612c7522..4c50db71 100644 --- a/htdocs/lib/DemodulatorPanel.js +++ b/htdocs/lib/DemodulatorPanel.js @@ -101,12 +101,9 @@ DemodulatorPanel.prototype.setMode = function(requestedModulation, underlyingMod var modulation; if (mode.type === 'digimode') { - if (underlyingModulation) { - modulation = underlyingModulation - } else { - modulation = mode.underlying[0]; - } + modulation = underlyingModulation = underlyingModulation || mode.underlying[0]; } else { + underlyingModulation = undefined; modulation = mode.modulation; } @@ -147,7 +144,7 @@ DemodulatorPanel.prototype.setMode = function(requestedModulation, underlyingMod this.demodulator.start(); this.mode = mode; - this.underlyingModulation = modulation; + this.underlyingModulation = underlyingModulation; this.updateButtons(); this.updatePanels();