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

View File

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