From 8a33423ad6877fdb2bc1bc50c6506cff4ce9c5aa Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 16 Jan 2012 18:07:09 -0800 Subject: uhd: rev iq correction numbers format --- host/lib/usrp/cores/rx_frontend_core_200.cpp | 4 ++-- host/lib/usrp/cores/tx_frontend_core_200.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/cores') 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 &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 &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: -- cgit v1.2.3