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

AFC: more debug messages

This commit is contained in:
f4exb 2022-02-27 19:26:18 +01:00
parent 16547b2468
commit c90d04e4b6

View File

@ -637,14 +637,20 @@ void AFC::trackerDeviceChange(int deviceIndex)
if (channel->getURI() == "sdrangel.channel.freqtracker") if (channel->getURI() == "sdrangel.channel.freqtracker")
{ {
MessageQueue *messageQueue = mainCore->getMessagePipes().registerChannelToFeature(channel, this, "settings"); ObjectPipe *pipe = mainCore->getMessagePipes2().registerProducerToConsumer(channel, this, "settings");
QObject::connect( MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
messageQueue,
&MessageQueue::messageEnqueued, if (messageQueue)
this, {
[=](){ this->handleChannelMessageQueue(messageQueue); }, QObject::connect(
Qt::QueuedConnection messageQueue,
); &MessageQueue::messageEnqueued,
this,
[=](){ this->handleChannelMessageQueue(messageQueue); },
Qt::QueuedConnection
);
}
m_trackerChannelAPI = channel; m_trackerChannelAPI = channel;
break; break;
} }
@ -668,15 +674,20 @@ void AFC::trackedDeviceChange(int deviceIndex)
if (channel->getURI() != "sdrangel.channel.freqtracker") if (channel->getURI() != "sdrangel.channel.freqtracker")
{ {
MessageQueue *messageQueue = mainCore->getMessagePipes().registerChannelToFeature(channel, this, "settings"); ObjectPipe *pipe = mainCore->getMessagePipes2().registerProducerToConsumer(channel, this, "settings");
QObject::connect( MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
messageQueue,
&MessageQueue::messageEnqueued, if (messageQueue)
this, {
[=](){ this->handleChannelMessageQueue(messageQueue); }, QObject::connect(
Qt::QueuedConnection messageQueue,
); &MessageQueue::messageEnqueued,
m_trackerIndexInDeviceSet = i; this,
[=](){ this->handleChannelMessageQueue(messageQueue); },
Qt::QueuedConnection
);
m_trackerIndexInDeviceSet = i;
}
} }
} }
} }
@ -688,9 +699,12 @@ 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())); qDebug("AFC::removeTrackerFeatureReference: m_trackerChannelAPI: %s", qPrintable(m_trackerChannelAPI->objectName()));
MessageQueue *messageQueue ObjectPipe *pipe = MainCore::instance()->getMessagePipes2().unregisterProducerToConsumer(m_trackerChannelAPI, this, "settings");
= MainCore::instance()->getMessagePipes().unregisterChannelToFeature(m_trackerChannelAPI, this, "settings"); MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
disconnect(messageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessageQueue(MessageQueue*)));
if (messageQueue) {
disconnect(messageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessageQueue(MessageQueue*)));
}
} }
} }
} }
@ -704,7 +718,7 @@ void AFC::removeTrackedFeatureReferences()
if (MainCore::instance()->existsChannel(channel)) if (MainCore::instance()->existsChannel(channel))
{ {
qDebug("AFC::removeTrackedFeatureReferences: channel: %s", qPrintable(channel->objectName())); qDebug("AFC::removeTrackedFeatureReferences: channel: %s", qPrintable(channel->objectName()));
MainCore::instance()->getMessagePipes().unregisterChannelToFeature(channel, this, "settings"); MainCore::instance()->getMessagePipes2().unregisterProducerToConsumer(channel, this, "settings");
} }
} }