From 16547b2468877b1653f7b2d1eba0788f289c50d2 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 27 Feb 2022 18:58:43 +0100 Subject: [PATCH] AFC: more debug messages --- plugins/feature/afc/afc.cpp | 10 +++++++++- sdrbase/pipes/messagepipes.cpp | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/feature/afc/afc.cpp b/plugins/feature/afc/afc.cpp index 9ae389fa4..68ba2456f 100644 --- a/plugins/feature/afc/afc.cpp +++ b/plugins/feature/afc/afc.cpp @@ -159,6 +159,7 @@ bool AFC::handleMessage(const Message& cmd) } else if (MsgDevicesApply::match(cmd)) { + qDebug("AFC::handleMessage: MsgDevicesApply"); removeTrackerFeatureReference(); trackerDeviceChange(m_settings.m_trackerDeviceSetIndex); removeTrackedFeatureReferences(); @@ -621,6 +622,8 @@ void AFC::networkManagerFinished(QNetworkReply *reply) void AFC::trackerDeviceChange(int deviceIndex) { + qDebug("AFC::trackerDeviceChange: deviceIndex: %d", deviceIndex); + if (deviceIndex < 0) { return; } @@ -650,6 +653,8 @@ void AFC::trackerDeviceChange(int deviceIndex) void AFC::trackedDeviceChange(int deviceIndex) { + qDebug("AFC::trackedDeviceChange: deviceIndex: %d", deviceIndex); + if (deviceIndex < 0) { return; } @@ -682,6 +687,7 @@ void AFC::removeTrackerFeatureReference() { if (MainCore::instance()->existsChannel(m_trackerChannelAPI)) { + qDebug("AFC::removeTrackerFeatureReference: m_trackerChannelAPI: %s", qPrintable(m_trackerChannelAPI->objectName())); MessageQueue *messageQueue = MainCore::instance()->getMessagePipes().unregisterChannelToFeature(m_trackerChannelAPI, this, "settings"); disconnect(messageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessageQueue(MessageQueue*))); @@ -695,7 +701,9 @@ void AFC::removeTrackedFeatureReferences() { ChannelAPI *channel = *it; - if (MainCore::instance()->existsChannel(channel)) { + if (MainCore::instance()->existsChannel(channel)) + { + qDebug("AFC::removeTrackedFeatureReferences: channel: %s", qPrintable(channel->objectName())); MainCore::instance()->getMessagePipes().unregisterChannelToFeature(channel, this, "settings"); } } diff --git a/sdrbase/pipes/messagepipes.cpp b/sdrbase/pipes/messagepipes.cpp index 4dd5cf222..da0818302 100644 --- a/sdrbase/pipes/messagepipes.cpp +++ b/sdrbase/pipes/messagepipes.cpp @@ -44,11 +44,13 @@ MessagePipes::~MessagePipes() MessageQueue *MessagePipes::registerChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& type) { + qDebug("MessagePipes::registerChannelToFeature: %p %p %s", source, dest, qPrintable(type)); return m_registrations.registerProducerToConsumer(source, dest, type); } MessageQueue *MessagePipes::unregisterChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& type) { + qDebug("MessagePipes::unregisterChannelToFeature: %p %p %s", source, dest, qPrintable(type)); MessageQueue *messageQueue = m_registrations.unregisterProducerToConsumer(source, dest, type); m_gcWorker->addMessageQueueToDelete(messageQueue); return messageQueue; @@ -56,6 +58,7 @@ MessageQueue *MessagePipes::unregisterChannelToFeature(const PipeEndPoint *sourc QList* MessagePipes::getMessageQueues(const PipeEndPoint *source, const QString& type) { + qDebug("MessagePipes::getMessageQueues: %p %s", source, qPrintable(type)); return m_registrations.getElements(source, type); }