1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 10:33:29 -05:00

SoapySDR support: if no label is registered for the device then create one with the driver name and sequence

This commit is contained in:
f4exb 2018-11-16 11:19:04 +01:00
parent 8e5a332b50
commit 710718682f

View File

@ -66,14 +66,16 @@ void DeviceSoapySDRScan::scan()
SoapySDR::Kwargs::const_iterator kargIt;
if ((kargIt = kit->find("label")) != kit->end())
{
if ((kargIt = kit->find("label")) != kit->end()) {
m_deviceEnums.back().m_label = QString(kargIt->second.c_str());
} else { // if no label is registered for this device then create a label with the driver name and sequence
m_deviceEnums.back().m_label = QString("%1-%2").arg(m_deviceEnums.back().m_driverName).arg(deviceSeq);
}
qDebug("DeviceSoapySDRScan::scan: %s #%u %s",
m_deviceEnums.back().m_driverName.toStdString().c_str(),
deviceSeq,
kargIt->second.c_str());
}
m_deviceEnums.back().m_label.toStdString().c_str());
if ((kargIt = kit->find("serial")) != kit->end())
{