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:
parent
16547b2468
commit
c90d04e4b6
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user