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:
parent
8e5a332b50
commit
710718682f
@ -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())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user