summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-11-11 16:06:50 -0800
committerJosh Blum <josh@joshknows.com>2011-11-11 16:06:50 -0800
commit88e02e0d55f7a80180402c7c86132d22a43ec551 (patch)
tree1fa3ac60ec825c31d77610e979210853f9c7d168 /host/lib/usrp/usrp2
parent3e4f64188bec333d8884a3849ec2377165b0017c (diff)
downloaduhd-88e02e0d55f7a80180402c7c86132d22a43ec551.tar.gz
uhd-88e02e0d55f7a80180402c7c86132d22a43ec551.tar.bz2
uhd-88e02e0d55f7a80180402c7c86132d22a43ec551.zip
uhd: created rx IQ imbalance app to parallel tx
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp13
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp3
2 files changed, 13 insertions, 3 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 6170948ca..14fa93221 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -608,6 +608,11 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
_tree->access<double>(db_tx_fe_path / name / "freq" / "value")
.subscribe(boost::bind(&usrp2_impl::set_tx_fe_corrections, this, mb, _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(&usrp2_impl::set_rx_fe_corrections, this, mb, _1));
+ }
}
//initialize io handling
@@ -661,8 +666,12 @@ sensor_value_t usrp2_impl::get_ref_locked(const std::string &mb){
return sensor_value_t("Ref", lock, "locked", "unlocked");
}
-void usrp2_impl::set_tx_fe_corrections(const std::string &mb, const double tx_lo_freq){
- apply_tx_fe_corrections(this->get_tree()->subtree("/mboards/" + mb), "A", tx_lo_freq);
+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);
+}
+
+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);
}
#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 74ef3d460..278dc713e 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -106,7 +106,8 @@ private:
uhd::sensor_value_t get_mimo_locked(const std::string &);
uhd::sensor_value_t get_ref_locked(const std::string &);
- void set_tx_fe_corrections(const std::string &mb, const double tx_lo_freq);
+ void set_rx_fe_corrections(const std::string &mb, const double);
+ void set_tx_fe_corrections(const std::string &mb, const double);
//device properties interface
uhd::property_tree::sptr get_tree(void) const{