summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-10-23 18:02:43 -0700
committerJosh Blum <josh@joshknows.com>2011-11-03 20:37:13 -0700
commitc63a38e1f9b383663e5bb52a1ae35b54bbc0104e (patch)
tree60324c9a3eb9ad0bdca8b25669842db8f31a2bf2 /host/lib
parentf11d64579a7c1421cc2b0f04c85f0c0e82b6a74e (diff)
downloaduhd-c63a38e1f9b383663e5bb52a1ae35b54bbc0104e.tar.gz
uhd-c63a38e1f9b383663e5bb52a1ae35b54bbc0104e.tar.bz2
uhd-c63a38e1f9b383663e5bb52a1ae35b54bbc0104e.zip
usrp: add api call to adjust phase/mag imbalance
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/multi_usrp.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 5fff989ce..5a6acc2c5 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -567,6 +567,16 @@ public:
}
}
+ void set_rx_correction(const std::complex<double> &offset, size_t chan){
+ if (chan != ALL_CHANS){
+ _tree->access<std::complex<double> >(rx_rf_fe_root(chan).branch_path() / "correction" / "value").set(offset);
+ return;
+ }
+ for (size_t c = 0; c < get_rx_num_channels(); c++){
+ this->set_rx_correction(offset, c);
+ }
+ }
+
/*******************************************************************
* TX methods
******************************************************************/
@@ -691,6 +701,16 @@ public:
}
}
+ void set_tx_correction(const std::complex<double> &offset, size_t chan){
+ if (chan != ALL_CHANS){
+ _tree->access<std::complex<double> >(tx_rf_fe_root(chan).branch_path() / "correction" / "value").set(offset);
+ return;
+ }
+ for (size_t c = 0; c < get_tx_num_channels(); c++){
+ this->set_tx_correction(offset, c);
+ }
+ }
+
private:
device::sptr _dev;
property_tree::sptr _tree;