1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-05-24 19:22:27 -04:00

LimeSDR output: optimize get device info by checking buddy leadership in the GUI

This commit is contained in:
f4exb 2017-07-03 23:29:06 +02:00
parent b867cf2335
commit efe921ffe7
2 changed files with 33 additions and 32 deletions

View File

@ -431,14 +431,12 @@ bool LimeSDROutput::handleMessage(const Message& message)
return true;
}
else if (MsgGetDeviceInfo::match(message))
{
if (m_deviceAPI->isBuddyLeader())
{
double temp = 0.0;
if (m_deviceShared.m_deviceParams->getDevice() && (LMS_GetChipTemperature(m_deviceShared.m_deviceParams->getDevice(), 0, &temp) == 0))
{
qDebug("LimeSDROutput::handleMessage: MsgGetDeviceInfo: temperature: %f", temp);
//qDebug("LimeSDROutput::handleMessage: MsgGetDeviceInfo: temperature: %f", temp);
}
else
{
@ -468,7 +466,6 @@ bool LimeSDROutput::handleMessage(const Message& message)
DeviceLimeSDRShared::MsgReportDeviceInfo *report = DeviceLimeSDRShared::MsgReportDeviceInfo::create(temp);
(*itSink)->getDeviceOutputMessageQueue()->push(report);
}
}
return true;
}

View File

@ -341,9 +341,13 @@ void LimeSDROutputGUI::updateStatus()
m_deviceStatusCounter++;
}
else
{
if (m_deviceAPI->isBuddyLeader())
{
LimeSDROutput::MsgGetDeviceInfo* message = LimeSDROutput::MsgGetDeviceInfo::create();
m_sampleSink->getInputMessageQueue()->push(message);
}
m_deviceStatusCounter = 0;
}
}