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

AFC: more debug messages

This commit is contained in:
f4exb 2022-02-27 18:58:43 +01:00
parent 75b034180c
commit 16547b2468
2 changed files with 12 additions and 1 deletions

View File

@ -159,6 +159,7 @@ bool AFC::handleMessage(const Message& cmd)
} }
else if (MsgDevicesApply::match(cmd)) else if (MsgDevicesApply::match(cmd))
{ {
qDebug("AFC::handleMessage: MsgDevicesApply");
removeTrackerFeatureReference(); removeTrackerFeatureReference();
trackerDeviceChange(m_settings.m_trackerDeviceSetIndex); trackerDeviceChange(m_settings.m_trackerDeviceSetIndex);
removeTrackedFeatureReferences(); removeTrackedFeatureReferences();
@ -621,6 +622,8 @@ void AFC::networkManagerFinished(QNetworkReply *reply)
void AFC::trackerDeviceChange(int deviceIndex) void AFC::trackerDeviceChange(int deviceIndex)
{ {
qDebug("AFC::trackerDeviceChange: deviceIndex: %d", deviceIndex);
if (deviceIndex < 0) { if (deviceIndex < 0) {
return; return;
} }
@ -650,6 +653,8 @@ void AFC::trackerDeviceChange(int deviceIndex)
void AFC::trackedDeviceChange(int deviceIndex) void AFC::trackedDeviceChange(int deviceIndex)
{ {
qDebug("AFC::trackedDeviceChange: deviceIndex: %d", deviceIndex);
if (deviceIndex < 0) { if (deviceIndex < 0) {
return; return;
} }
@ -682,6 +687,7 @@ void AFC::removeTrackerFeatureReference()
{ {
if (MainCore::instance()->existsChannel(m_trackerChannelAPI)) if (MainCore::instance()->existsChannel(m_trackerChannelAPI))
{ {
qDebug("AFC::removeTrackerFeatureReference: m_trackerChannelAPI: %s", qPrintable(m_trackerChannelAPI->objectName()));
MessageQueue *messageQueue MessageQueue *messageQueue
= MainCore::instance()->getMessagePipes().unregisterChannelToFeature(m_trackerChannelAPI, this, "settings"); = MainCore::instance()->getMessagePipes().unregisterChannelToFeature(m_trackerChannelAPI, this, "settings");
disconnect(messageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessageQueue(MessageQueue*))); disconnect(messageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessageQueue(MessageQueue*)));
@ -695,7 +701,9 @@ void AFC::removeTrackedFeatureReferences()
{ {
ChannelAPI *channel = *it; 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"); MainCore::instance()->getMessagePipes().unregisterChannelToFeature(channel, this, "settings");
} }
} }

View File

@ -44,11 +44,13 @@ MessagePipes::~MessagePipes()
MessageQueue *MessagePipes::registerChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& type) 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); return m_registrations.registerProducerToConsumer(source, dest, type);
} }
MessageQueue *MessagePipes::unregisterChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& 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); MessageQueue *messageQueue = m_registrations.unregisterProducerToConsumer(source, dest, type);
m_gcWorker->addMessageQueueToDelete(messageQueue); m_gcWorker->addMessageQueueToDelete(messageQueue);
return messageQueue; return messageQueue;
@ -56,6 +58,7 @@ MessageQueue *MessagePipes::unregisterChannelToFeature(const PipeEndPoint *sourc
QList<MessageQueue*>* MessagePipes::getMessageQueues(const PipeEndPoint *source, const QString& type) QList<MessageQueue*>* MessagePipes::getMessageQueues(const PipeEndPoint *source, const QString& type)
{ {
qDebug("MessagePipes::getMessageQueues: %p %s", source, qPrintable(type));
return m_registrations.getElements(source, type); return m_registrations.getElements(source, type);
} }