From 2f2d52df85fcf5e02f9ce42dba3b9dec917a4a14 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 3 May 2020 12:09:18 +0200 Subject: [PATCH] re-wire digital voice meta panels --- htdocs/lib/DemodulatorPanel.js | 7 +++++++ htdocs/openwebrx.js | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/lib/DemodulatorPanel.js b/htdocs/lib/DemodulatorPanel.js index 0994e4c..fb6e7c3 100644 --- a/htdocs/lib/DemodulatorPanel.js +++ b/htdocs/lib/DemodulatorPanel.js @@ -136,6 +136,13 @@ DemodulatorPanel.prototype.updatePanels = function() { toggle_panel("openwebrx-panel-js8-message", modulation == "js8"); toggle_panel("openwebrx-panel-packet-message", modulation === "packet"); toggle_panel("openwebrx-panel-pocsag-message", modulation === "pocsag"); + + modulation = this.getDemodulator().get_modulation(); + var showing = 'openwebrx-panel-metadata-' + modulation; + $(".openwebrx-meta-panel").each(function (_, p) { + toggle_panel(p.id, p.id === showing); + }); + clear_metadata(); }; DemodulatorPanel.prototype.getDemodulator = function() { diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index 47c8800..2e41038 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -1110,13 +1110,6 @@ function update_pocsag_panel(msg) { $b.scrollTop($b[0].scrollHeight); } -function update_digitalvoice_panels(showing) { - $(".openwebrx-meta-panel").each(function (_, p) { - toggle_panel(p.id, p.id === showing); - }); - clear_metadata(); -} - function clear_metadata() { $(".openwebrx-meta-panel .openwebrx-meta-autoclear").text(""); $(".openwebrx-meta-slot").removeClass("active").removeClass("sync");