aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-02-20 14:35:10 -0800
committerMartin Braun <martin.braun@ettus.com>2018-02-20 16:23:46 -0800
commitcf644768c43cc15844e3f1b64f6e363634719f5e (patch)
tree0b3aec92417298d35be134585ad9692ed96746ba /host
parent05dd12fda217a75387cb573488f306581f23541c (diff)
downloaduhd-cf644768c43cc15844e3f1b64f6e363634719f5e.tar.gz
uhd-cf644768c43cc15844e3f1b64f6e363634719f5e.tar.bz2
uhd-cf644768c43cc15844e3f1b64f6e363634719f5e.zip
uhd: device: Auto-apply config file options to USRPs
Diffstat (limited to 'host')
-rw-r--r--host/lib/device.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/host/lib/device.cpp b/host/lib/device.cpp
index 4953bb3b1..90d7ae374 100644
--- a/host/lib/device.cpp
+++ b/host/lib/device.cpp
@@ -12,6 +12,9 @@
#include <uhd/utils/static.hpp>
#include <uhd/utils/algorithm.hpp>
+#include <uhdlib/utils/prefs.hpp>
+
+
#include <boost/format.hpp>
#include <boost/weak_ptr.hpp>
#include <boost/functional/hash.hpp>
@@ -168,8 +171,10 @@ device::sptr device::make(const device_addr_t &hint, device_filter_t filter, siz
return hash_to_device[dev_hash].lock();
}
else {
- //create and register a new device
- device::sptr dev = maker(dev_addr);
+ // Add keys from the config files (note: the user-defined keys will
+ // always be applied, see also get_usrp_args()
+ // Then, create and register a new device.
+ device::sptr dev = maker(prefs::get_usrp_args(dev_addr));
hash_to_device[dev_hash] = dev;
return dev;
}