From 323ebb85f78ef24123ed1a19a1ac7fb3f775fe16 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 26 Mar 2022 10:22:19 +0100 Subject: [PATCH] Radiosonde demod: fixed reportdemod message pipes --- .../demodradiosonde/radiosondedemod.cpp | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/plugins/channelrx/demodradiosonde/radiosondedemod.cpp b/plugins/channelrx/demodradiosonde/radiosondedemod.cpp index 66bbbb146..e559c95a4 100644 --- a/plugins/channelrx/demodradiosonde/radiosondedemod.cpp +++ b/plugins/channelrx/demodradiosonde/radiosondedemod.cpp @@ -398,20 +398,17 @@ bool RadiosondeDemod::deserialize(const QByteArray& data) void RadiosondeDemod::sendSampleRateToDemodAnalyzer() { - QList *messageQueues = MainCore::instance()->getMessagePipesLegacy().getMessageQueues(this, "reportdemod"); + QList reportPipes; + MainCore::instance()->getMessagePipes().getMessagePipes(this, "reportdemod", reportPipes); - if (messageQueues) + for (const auto& pipe : reportPipes) { - QList::iterator it = messageQueues->begin(); - - for (; it != messageQueues->end(); ++it) - { - MainCore::MsgChannelDemodReport *msg = MainCore::MsgChannelDemodReport::create( - this, - RadiosondeDemodSettings::RADIOSONDEDEMOD_CHANNEL_SAMPLE_RATE - ); - (*it)->push(msg); - } + MessageQueue *messageQueue = qobject_cast(pipe->m_element); + MainCore::MsgChannelDemodReport *msg = MainCore::MsgChannelDemodReport::create( + this, + RadiosondeDemodSettings::RADIOSONDEDEMOD_CHANNEL_SAMPLE_RATE + ); + messageQueue->push(msg); } }