diff options
author | Josh Blum <josh@joshknows.com> | 2011-11-16 06:39:31 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-11-16 06:39:31 +0000 |
commit | 95568c8b30490f630a72b665b135c46549ee5882 (patch) | |
tree | 35d00a6ad0c7cc4fe1a8c2ea4e89b8e47e9e694a /host/lib/usrp/e100/e100_impl.cpp | |
parent | 075e6a9788856d6951df42349afef7816852ca68 (diff) | |
download | uhd-95568c8b30490f630a72b665b135c46549ee5882.tar.gz uhd-95568c8b30490f630a72b665b135c46549ee5882.tar.bz2 uhd-95568c8b30490f630a72b665b135c46549ee5882.zip |
e100: added self-cal support with minor speedups
Diffstat (limited to 'host/lib/usrp/e100/e100_impl.cpp')
-rw-r--r-- | host/lib/usrp/e100/e100_impl.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/host/lib/usrp/e100/e100_impl.cpp b/host/lib/usrp/e100/e100_impl.cpp index 7804f7fd8..8b7756461 100644 --- a/host/lib/usrp/e100/e100_impl.cpp +++ b/host/lib/usrp/e100/e100_impl.cpp @@ -15,6 +15,7 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. // +#include "apply_corrections.hpp" #include "e100_impl.hpp" #include "e100_regs.hpp" #include <uhd/utils/msg.hpp> @@ -374,6 +375,18 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){ _dboard_iface, _tree->subtree(mb_path / "dboards/A") ); + //bind frontend corrections to the dboard freq props + const fs_path db_tx_fe_path = mb_path / "dboards" / "A" / "tx_frontends"; + BOOST_FOREACH(const std::string &name, _tree->list(db_tx_fe_path)){ + _tree->access<double>(db_tx_fe_path / name / "freq" / "value") + .subscribe(boost::bind(&e100_impl::set_tx_fe_corrections, this, _1)); + } + const fs_path db_rx_fe_path = mb_path / "dboards" / "A" / "rx_frontends"; + BOOST_FOREACH(const std::string &name, _tree->list(db_rx_fe_path)){ + _tree->access<double>(db_rx_fe_path / name / "freq" / "value") + .subscribe(boost::bind(&e100_impl::set_rx_fe_corrections, this, _1)); + } + //initialize io handling this->io_init(); @@ -450,3 +463,11 @@ void e100_impl::check_fpga_compat(void){ } _tree->create<std::string>("/mboards/0/fpga_version").set(str(boost::format("%u.%u") % fpga_major % fpga_minor)); } + +void e100_impl::set_rx_fe_corrections(const double lo_freq){ + apply_rx_fe_corrections(this->get_tree()->subtree("/mboards/0"), "A", lo_freq); +} + +void e100_impl::set_tx_fe_corrections(const double lo_freq){ + apply_tx_fe_corrections(this->get_tree()->subtree("/mboards/0"), "A", lo_freq); +} |