mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-06 10:47:34 +01:00
add workaround for uhd bug reporting same device twice
This commit is contained in:
parent
650a61930c
commit
f1339f08cf
@ -78,6 +78,10 @@ public:
|
|||||||
std::string serial = devAddr["serial"];
|
std::string serial = devAddr["serial"];
|
||||||
std::string model = devAddr.has_key("product") ? devAddr["product"] : devAddr["type"];
|
std::string model = devAddr.has_key("product") ? devAddr["product"] : devAddr["type"];
|
||||||
sprintf(buf, "USRP %s [%s]", model.c_str(), serial.c_str());
|
sprintf(buf, "USRP %s [%s]", model.c_str(), serial.c_str());
|
||||||
|
|
||||||
|
// Work-around for UHD sometimes reporting the same device twice
|
||||||
|
if (devices.keyExists(serial)) { continue; }
|
||||||
|
|
||||||
devices.define(serial, buf, devAddr);
|
devices.define(serial, buf, devAddr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user