diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2014-08-15 16:06:28 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2014-09-02 12:08:36 +0200 |
commit | da018c53b473428bc5a53134136db24bdc3cf4dc (patch) | |
tree | 2d8c7670613930b25fca080e2a7912cbabcc508b /host/lib/usrp/usrp2 | |
parent | c219cee65a691792154e0ae2cdf9d81e539b1da8 (diff) | |
download | uhd-da018c53b473428bc5a53134136db24bdc3cf4dc.tar.gz uhd-da018c53b473428bc5a53134136db24bdc3cf4dc.tar.bz2 uhd-da018c53b473428bc5a53134136db24bdc3cf4dc.zip |
Give user the option to ignore daughterboard's calibration file at runtime
* Add "ignore-cal-file" to the uhd::device_addr_t arguments
* Added documentation for new feature
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.cpp | 9 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.hpp | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index 93885fbd3..0979ca071 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -369,6 +369,7 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){ //////////////////////////////////////////////////////////////////// _tree = property_tree::make(); _type = device::USRP; + _ignore_cal_file = device_addr.has_key("ignore-cal-file"); _tree->create<std::string>("/name").set("USRP2 / N-Series Device"); for (size_t mbi = 0; mbi < device_args.size(); mbi++){ @@ -796,11 +797,15 @@ sensor_value_t usrp2_impl::get_ref_locked(const std::string &mb){ } void usrp2_impl::set_rx_fe_corrections(const std::string &mb, const double lo_freq){ - apply_rx_fe_corrections(this->get_tree()->subtree("/mboards/" + mb), "A", lo_freq); + if(not _ignore_cal_file){ + apply_rx_fe_corrections(this->get_tree()->subtree("/mboards/" + mb), "A", lo_freq); + } } void usrp2_impl::set_tx_fe_corrections(const std::string &mb, const double lo_freq){ - apply_tx_fe_corrections(this->get_tree()->subtree("/mboards/" + mb), "A", lo_freq); + if(not _ignore_cal_file){ + apply_tx_fe_corrections(this->get_tree()->subtree("/mboards/" + mb), "A", lo_freq); + } } #include <boost/math/special_functions/round.hpp> diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp index d7b53e56b..edbb7888b 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.hpp +++ b/host/lib/usrp/usrp2/usrp2_impl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2012 Ettus Research LLC +// Copyright 2010-2012,2014 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -113,6 +113,7 @@ private: void set_rx_fe_corrections(const std::string &mb, const double); void set_tx_fe_corrections(const std::string &mb, const double); + bool _ignore_cal_file; //io impl methods and members UHD_PIMPL_DECL(io_impl) _io_impl; |