1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 01:39:05 -05:00

VOR Localizer: Update channels when device updated or when feature started, as device b/w or whether fixed center freq may have changed

This commit is contained in:
Jon Beniston 2022-05-04 08:21:50 +01:00
parent 6a6ccbeecd
commit 2f1fe7ecb3

View File

@ -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();
}