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