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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user