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

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

View File

@ -442,8 +442,6 @@ bool LimeSDRInput::handleMessage(const Message& message)
return true;
}
else if (MsgGetDeviceInfo::match(message))
{
if (m_deviceAPI->isBuddyLeader())
{
double temp = 0.0;
@ -479,7 +477,6 @@ bool LimeSDRInput::handleMessage(const Message& message)
DeviceLimeSDRShared::MsgReportDeviceInfo *report = DeviceLimeSDRShared::MsgReportDeviceInfo::create(temp);
(*itSink)->getDeviceOutputMessageQueue()->push(report);
}
}
return true;
}

View File

@ -347,9 +347,13 @@ void LimeSDRInputGUI::updateStatus()
m_deviceStatusCounter++;
}
else
{
if (m_deviceAPI->isBuddyLeader())
{
LimeSDRInput::MsgGetDeviceInfo* message = LimeSDRInput::MsgGetDeviceInfo::create();
m_sampleSource->getInputMessageQueue()->push(message);
}
m_deviceStatusCounter = 0;
}
}