Skip to content

Commit

Permalink
add workaround for uhd bug reporting same device twice
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreRouma committed Feb 17, 2024
1 parent 650a619 commit f1339f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source_modules/usrp_source/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ class USRPSourceModule : public ModuleManager::Instance {
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);
}
}
Expand Down

0 comments on commit f1339f0

Please sign in to comment.