diff --git a/devices/soapysdr/devicesoapysdrscan.cpp b/devices/soapysdr/devicesoapysdrscan.cpp index 61b44d0c2..234f6e6ef 100644 --- a/devices/soapysdr/devicesoapysdrscan.cpp +++ b/devices/soapysdr/devicesoapysdrscan.cpp @@ -66,15 +66,17 @@ 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()); - qDebug("DeviceSoapySDRScan::scan: %s #%u %s", - m_deviceEnums.back().m_driverName.toStdString().c_str(), - deviceSeq, - 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, + m_deviceEnums.back().m_label.toStdString().c_str()); + if ((kargIt = kit->find("serial")) != kit->end()) { m_deviceEnums.back().m_idKey = QString(kargIt->first.c_str());