aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils/usrp1_init_eeprom.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-20 14:13:37 -0700
committerJosh Blum <josh@joshknows.com>2011-07-20 14:13:37 -0700
commit9851de0713b4c6d14a870a1d8816451ca518ff52 (patch)
tree41d1ff8e4d4febd8babfb46a9779def2c2314a2b /host/utils/usrp1_init_eeprom.cpp
parent117f6a3359a8a21acf396b0e0f084c32770e0b3a (diff)
downloaduhd-9851de0713b4c6d14a870a1d8816451ca518ff52.tar.gz
uhd-9851de0713b4c6d14a870a1d8816451ca518ff52.tar.bz2
uhd-9851de0713b4c6d14a870a1d8816451ca518ff52.zip
uhd: add get_tree call directly to the device
Does away with the need for wax cast to get the tree. You can still do this but it will eventually be removed. There was some compiler issue on ubuntu 10.04 with any cast and a shared ptr to property tree.
Diffstat (limited to 'host/utils/usrp1_init_eeprom.cpp')
-rw-r--r--host/utils/usrp1_init_eeprom.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/utils/usrp1_init_eeprom.cpp b/host/utils/usrp1_init_eeprom.cpp
index 5bc07daf6..1778d5f9d 100644
--- a/host/utils/usrp1_init_eeprom.cpp
+++ b/host/utils/usrp1_init_eeprom.cpp
@@ -65,7 +65,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
std::cout << "Writing EEPROM data..." << std::endl;
//uhd::device_addrs_t devs = uhd::device::find(found_addrs[i]);
uhd::device::sptr dev = uhd::device::make(found_addrs[i]);
- uhd::property_tree::sptr tree = (*dev)[0].as<uhd::property_tree::sptr>();
+ uhd::property_tree::sptr tree = dev->get_tree();
tree->access<std::string>("/mboards/0/load_eeprom").set(vm["image"].as<std::string>());
}