add workaround for uhd bug reporting same device twice

This commit is contained in:
AlexandreRouma 2024-02-17 06:30:06 +01:00
parent 650a61930c
commit f1339f08cf

View File

@ -78,6 +78,10 @@ public:
std::string serial = devAddr["serial"];
std::string model = devAddr.has_key("product") ? devAddr["product"] : devAddr["type"];
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);
}
}