From d0039bd4128eed56acccce7b20c913afa8cb7381 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 8 Jun 2010 00:00:54 -0700 Subject: Replaced convert types with generated convert types that handles more cases. Added unit test for generated converter. --- host/lib/usrp/dsp_utils.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'host/lib/usrp') diff --git a/host/lib/usrp/dsp_utils.hpp b/host/lib/usrp/dsp_utils.hpp index 8a6afb292..cfe5375f8 100644 --- a/host/lib/usrp/dsp_utils.hpp +++ b/host/lib/usrp/dsp_utils.hpp @@ -81,15 +81,14 @@ namespace dsp_type1{ /*! * Calculate the IQ scale factor word from I and Q components. - * \param i the I component - * \param q the Q component + * \param i the I component of the scalar + * \param q the Q component of the scalar * \return the 32-bit scale factor control word */ static inline boost::uint32_t calc_iq_scale_word( - boost::int16_t i, - boost::int16_t q + boost::int16_t i, boost::int16_t q ){ - return (boost::uint16_t(i) << 16) | (boost::uint16_t(q) << 0); + return (boost::uint32_t(i) << 16) | (boost::uint32_t(q) << 0); } /*! -- cgit v1.2.3