USRP enumeration: use default name and serial if not available. Fixes #1239

pull/1245/head
f4exb 2022-05-14 11:20:37 +02:00
rodzic 11ce179f02
commit 6e7774d9f7
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -45,8 +45,8 @@ void DeviceUSRP::enumOriginDevices(const QString& hardwareId, PluginInterface::O
for(unsigned i = 0; i != dev_addrs.size(); i++)
{
QString id = QString::fromStdString(dev_addrs[i].to_string());
QString name = QString::fromStdString(dev_addrs[i].get("name"));
QString serial = QString::fromStdString(dev_addrs[i].get("serial"));
QString name = QString::fromStdString(dev_addrs[i].get("name", "N/A"));
QString serial = QString::fromStdString(dev_addrs[i].get("serial", "N/A"));
QString displayedName(QString("%1[%2:$1] %3").arg(name).arg(i).arg(serial));
qDebug() << "DeviceUSRP::enumOriginDevices: found USRP device " << displayedName;