uhd: Pass UHD command line arguments to constructor

Previous behaviour used UHD command line args string for device search,
but did not apply the values to the device constructor. Now use the user
passed args string for both find and device construction.

Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
This commit is contained in:
Tom Tsou 2015-05-18 16:51:44 -07:00
parent 90f7a01d1d
commit 5c7c178369
1 changed files with 2 additions and 2 deletions

View File

@ -707,9 +707,9 @@ int uhd_device::open(const std::string &args, bool extref)
// Use the first found device
LOG(INFO) << "Using discovered UHD device " << dev_addrs[0].to_string();
try {
usrp_dev = uhd::usrp::multi_usrp::make(dev_addrs[0]);
usrp_dev = uhd::usrp::multi_usrp::make(addr);
} catch(...) {
LOG(ALERT) << "UHD make failed, device " << dev_addrs[0].to_string();
LOG(ALERT) << "UHD make failed, device " << args;
return -1;
}