add workaround for uhd bug reporting same device twice

pull/1338/head
AlexandreRouma 2024-02-17 06:30:06 +01:00
rodzic 650a61930c
commit f1339f08cf
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

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