1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -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
@@ -405,20 +405,18 @@ void SatelliteTrackerWorker::update()
azimuth = std::fmod(azimuth + 180.0, 360.0);
elevation = 180.0 - elevation;
}
MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipesLegacy();
QList<MessageQueue*> *rotatorMessageQueues = messagePipes.getMessageQueues(m_satelliteTracker, "target");
if (rotatorMessageQueues)
{
QList<MessageQueue*>::iterator it = rotatorMessageQueues->begin();
for (; it != rotatorMessageQueues->end(); ++it)
{
SWGSDRangel::SWGTargetAzimuthElevation *swgTarget = new SWGSDRangel::SWGTargetAzimuthElevation();
swgTarget->setName(new QString(m_settings.m_target));
swgTarget->setAzimuth(azimuth);
swgTarget->setElevation(elevation);
(*it)->push(MainCore::MsgTargetAzimuthElevation::create(m_satelliteTracker, swgTarget));
}
QList<ObjectPipe*> rotatorPipes;
MainCore::instance()->getMessagePipes().getMessagePipes(m_satelliteTracker, "target", rotatorPipes);
for (const auto& pipe : rotatorPipes)
{
MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
SWGSDRangel::SWGTargetAzimuthElevation *swgTarget = new SWGSDRangel::SWGTargetAzimuthElevation();
swgTarget->setName(new QString(m_settings.m_target));
swgTarget->setAzimuth(azimuth);
swgTarget->setElevation(elevation);
messageQueue->push(MainCore::MsgTargetAzimuthElevation::create(m_satelliteTracker, swgTarget));
}
}