diff options
author | Julian Arnold <julian.arnold@ettus.com> | 2015-02-20 10:49:53 -0800 |
---|---|---|
committer | Julian Arnold <julian.arnold@ettus.com> | 2015-02-20 11:00:33 -0800 |
commit | 4602ea9148e5e36fefca6402b7dcc5a1104e7410 (patch) | |
tree | ac1430e084641e4689dceafbb70b8af5c9b961ca /host/lib | |
parent | 09c9c6bb77d4f1f2fa0682835fc3a6ef6e3e851a (diff) | |
download | uhd-4602ea9148e5e36fefca6402b7dcc5a1104e7410.tar.gz uhd-4602ea9148e5e36fefca6402b7dcc5a1104e7410.tar.bz2 uhd-4602ea9148e5e36fefca6402b7dcc5a1104e7410.zip |
uhd: iq imbalance correction api
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index eab8c5283..e7d39b244 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -916,6 +916,9 @@ public: if (chan != ALL_CHANS){ if (_tree->exists(rx_fe_root(chan) / "dc_offset" / "enable")) { _tree->access<bool>(rx_fe_root(chan) / "dc_offset" / "enable").set(enb); + } else if (_tree->exists(rx_rf_fe_root(chan) / "dc_offset" / "enable")) { + /*For B2xx devices the dc-offset correction is implemented in the rf front-end*/ + _tree->access<bool>(rx_rf_fe_root(chan) / "dc_offset" / "enable").set(enb); } else { UHD_MSG(warning) << "Setting DC offset compensation is not possible on this device." << std::endl; } @@ -940,6 +943,20 @@ public: } } + void set_rx_iq_balance(const bool enb, size_t chan){ + if (chan != ALL_CHANS){ + if (_tree->exists(rx_rf_fe_root(chan) / "iq_balance" / "enable")) { + _tree->access<bool>(rx_rf_fe_root(chan) / "iq_balance" / "enable").set(enb); + } else { + UHD_MSG(warning) << "Setting IQ imbalance compensation is not possible on this device." << std::endl; + } + return; + } + for (size_t c = 0; c < get_rx_num_channels(); c++){ + this->set_rx_iq_balance(enb, c); + } + } + void set_rx_iq_balance(const std::complex<double> &offset, size_t chan){ if (chan != ALL_CHANS){ if (_tree->exists(rx_fe_root(chan) / "iq_balance" / "value")) { |