Skip to content

Commit f1339f0

Browse files
add workaround for uhd bug reporting same device twice
1 parent 650a619 commit f1339f0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source_modules/usrp_source/src/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ class USRPSourceModule : public ModuleManager::Instance {
7878
std::string serial = devAddr["serial"];
7979
std::string model = devAddr.has_key("product") ? devAddr["product"] : devAddr["type"];
8080
sprintf(buf, "USRP %s [%s]", model.c_str(), serial.c_str());
81+
82+
// Work-around for UHD sometimes reporting the same device twice
83+
if (devices.keyExists(serial)) { continue; }
84+
8185
devices.define(serial, buf, devAddr);
8286
}
8387
}

0 commit comments

Comments
 (0)