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

Combine results from worker. Automatically add / remove channels.

This commit is contained in:
srcejon
2024-04-04 15:19:35 +01:00
parent f9b43294a8
commit 5e15edcbcf
11 changed files with 236 additions and 91 deletions
+10 -2
View File
@@ -112,6 +112,8 @@ void SIDWorker::update()
{
// Get powers from each channel
QDateTime dateTime = QDateTime::currentDateTime();
QStringList ids;
QList<double> measurements;
for (const auto& channelSettings : m_settings.m_channelSettings)
{
@@ -133,8 +135,8 @@ void SIDWorker::update()
{
if (getMessageQueueToGUI())
{
SIDMain::MsgMeasurement *msgToGUI = SIDMain::MsgMeasurement::create(dateTime, channelSettings.m_id, power);
getMessageQueueToGUI()->push(msgToGUI);
ids.append(channelSettings.m_id);
measurements.append(power);
}
}
else
@@ -150,4 +152,10 @@ void SIDWorker::update()
}
}
}
if (getMessageQueueToGUI() && (ids.size() > 0))
{
SIDMain::MsgMeasurement *msgToGUI = SIDMain::MsgMeasurement::create(dateTime, ids, measurements);
getMessageQueueToGUI()->push(msgToGUI);
}
}