From 2f1fe7ecb3573584d08ee29129f1fa15f4c8112a Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Wed, 4 May 2022 08:21:50 +0100 Subject: [PATCH] VOR Localizer: Update channels when device updated or when feature started, as device b/w or whether fixed center freq may have changed --- plugins/feature/vorlocalizer/vorlocalizergui.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/feature/vorlocalizer/vorlocalizergui.cpp b/plugins/feature/vorlocalizer/vorlocalizergui.cpp index fb8d1356a..dfb398814 100644 --- a/plugins/feature/vorlocalizer/vorlocalizergui.cpp +++ b/plugins/feature/vorlocalizer/vorlocalizergui.cpp @@ -698,6 +698,12 @@ void VORLocalizerGUI::on_startStop_toggled(bool checked) { VORLocalizer::MsgStartStop *message = VORLocalizer::MsgStartStop::create(checked); m_vorLocalizer->getInputMessageQueue()->push(message); + + if (checked) + { + // Refresh channels in case device b/w has changed + channelsRefresh(); + } } } @@ -954,6 +960,8 @@ VORLocalizerGUI::VORLocalizerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe // Update channel list when added/removed connect(MainCore::instance(), &MainCore::channelAdded, this, &VORLocalizerGUI::channelsRefresh); connect(MainCore::instance(), &MainCore::channelRemoved, this, &VORLocalizerGUI::channelsRefresh); + // Also replan when device changed (as bandwidth may change or may becomed fixed center freq) + connect(MainCore::instance(), &MainCore::deviceChanged, this, &VORLocalizerGUI::channelsRefresh); // List already opened channels channelsRefresh(); }