1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-05 15:34:57 -04:00

Rotator controller and dependent plugins: implemented new message pipes and other fixes. Part of #1154

This commit is contained in:
f4exb
2022-03-28 20:12:25 +02:00
parent 1819ca6e94
commit 842546aec6
25 changed files with 694 additions and 241 deletions
+21 -9
View File
@@ -62,12 +62,22 @@ VORLocalizer::VORLocalizer(WebAPIAdapterInterface *webAPIAdapterInterface) :
this,
&VORLocalizer::networkManagerFinished
);
connect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
QObject::connect(
MainCore::instance(),
&MainCore::channelAdded,
this,
&VORLocalizer::handleChannelAdded
);
}
VORLocalizer::~VORLocalizer()
{
disconnect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
QObject::disconnect(
MainCore::instance(),
&MainCore::channelAdded,
this,
&VORLocalizer::handleChannelAdded
);
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
@@ -264,13 +274,10 @@ bool VORLocalizer::handleMessage(const Message& cmd)
void VORLocalizer::handleMessagePipeToBeDeleted(int reason, QObject* object)
{
if (reason == 0) // producer (channel)
if ((reason == 0) && m_availableChannels.contains((ChannelAPI*) object)) // producer (channel)
{
if (m_availableChannels.contains((ChannelAPI*) object))
{
m_availableChannels.remove((ChannelAPI*) object);
updateChannels();
}
m_availableChannels.remove((ChannelAPI*) object);
updateChannels();
}
}
@@ -679,7 +686,12 @@ void VORLocalizer::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
[=](){ this->handleChannelMessageQueue(messageQueue); },
Qt::QueuedConnection
);
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
QObject::connect(
pipe,
&ObjectPipe::toBeDeleted,
this,
&VORLocalizer::handleMessagePipeToBeDeleted
);
}
VORLocalizerSettings::AvailableChannel availableChannel =