1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 23:55:13 -05:00

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

This commit is contained in:
f4exb 2022-05-14 11:20:37 +02:00
parent 11ce179f02
commit 6e7774d9f7

View File

@ -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;