diff options
author | Josh Blum <josh@joshknows.com> | 2012-01-16 18:07:09 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-03-14 00:02:44 -0700 |
commit | 8a33423ad6877fdb2bc1bc50c6506cff4ce9c5aa (patch) | |
tree | c0aef50afc507333f80fe31e000fa6f3f980a4d3 /host/lib/usrp/cores | |
parent | abab58f5404fcd769bf72fd0f486323659e9c087 (diff) | |
download | uhd-8a33423ad6877fdb2bc1bc50c6506cff4ce9c5aa.tar.gz uhd-8a33423ad6877fdb2bc1bc50c6506cff4ce9c5aa.tar.bz2 uhd-8a33423ad6877fdb2bc1bc50c6506cff4ce9c5aa.zip |
uhd: rev iq correction numbers format
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r-- | host/lib/usrp/cores/rx_frontend_core_200.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/cores/tx_frontend_core_200.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/cores/rx_frontend_core_200.cpp b/host/lib/usrp/cores/rx_frontend_core_200.cpp index d6396ef45..eb9f39fcf 100644 --- a/host/lib/usrp/cores/rx_frontend_core_200.cpp +++ b/host/lib/usrp/cores/rx_frontend_core_200.cpp @@ -64,8 +64,8 @@ public: } void set_iq_balance(const std::complex<double> &cor){ - _iface->poke32(REG_RX_FE_MAG_CORRECTION, fs_to_bits(std::abs(cor) - 1, 18)); - _iface->poke32(REG_RX_FE_PHASE_CORRECTION, fs_to_bits(std::arg(cor)/6.28318531, 18)); + _iface->poke32(REG_RX_FE_MAG_CORRECTION, fs_to_bits(cor.real(), 18)); + _iface->poke32(REG_RX_FE_PHASE_CORRECTION, fs_to_bits(cor.imag(), 18)); } private: diff --git a/host/lib/usrp/cores/tx_frontend_core_200.cpp b/host/lib/usrp/cores/tx_frontend_core_200.cpp index b90281d9f..e35874173 100644 --- a/host/lib/usrp/cores/tx_frontend_core_200.cpp +++ b/host/lib/usrp/cores/tx_frontend_core_200.cpp @@ -62,8 +62,8 @@ public: } void set_iq_balance(const std::complex<double> &cor){ - _iface->poke32(REG_TX_FE_MAG_CORRECTION, fs_to_bits(std::abs(cor) - 1, 18)); - _iface->poke32(REG_TX_FE_PHASE_CORRECTION, fs_to_bits(std::arg(cor)/6.28318531, 18)); + _iface->poke32(REG_TX_FE_MAG_CORRECTION, fs_to_bits(cor.real(), 18)); + _iface->poke32(REG_TX_FE_PHASE_CORRECTION, fs_to_bits(cor.imag(), 18)); } private: |