From c63a38e1f9b383663e5bb52a1ae35b54bbc0104e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 23 Oct 2011 18:02:43 -0700 Subject: usrp: add api call to adjust phase/mag imbalance --- host/lib/usrp/multi_usrp.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'host/lib/usrp') 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 &offset, size_t chan){ + if (chan != ALL_CHANS){ + _tree->access >(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 &offset, size_t chan){ + if (chan != ALL_CHANS){ + _tree->access >(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; -- cgit v1.2.3