diff options
author | Josh Blum <josh@joshknows.com> | 2010-07-16 01:54:59 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-07-16 01:54:59 +0000 |
commit | 076692f74e86317f337df85b222f391f541d6bbf (patch) | |
tree | 15a652def82115f59c44b2b863a0e96ede794e04 /host/lib/usrp | |
parent | a17b6c31ecefa2f8752bb30b222eb3fa8b7d88d5 (diff) | |
parent | 8171547b6cf8eaf95901f6f4fbc47c1720caf39a (diff) | |
download | uhd-076692f74e86317f337df85b222f391f541d6bbf.tar.gz uhd-076692f74e86317f337df85b222f391f541d6bbf.tar.bz2 uhd-076692f74e86317f337df85b222f391f541d6bbf.zip |
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/dsp_utils.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/usrp/dsp_utils.hpp b/host/lib/usrp/dsp_utils.hpp index 3fd5f1811..13186f354 100644 --- a/host/lib/usrp/dsp_utils.hpp +++ b/host/lib/usrp/dsp_utils.hpp @@ -85,13 +85,13 @@ namespace dsp_type1{ UHD_ASSERT_THROW(std::abs(freq) < codec_rate/2.0); static const double scale_factor = std::pow(2.0, 32); - //calculate the freq register word - boost::uint32_t freq_word = boost::math::iround((freq / codec_rate) * scale_factor); + //calculate the freq register word (signed) + boost::int32_t freq_word = boost::math::iround((freq / codec_rate) * scale_factor); //update the actual frequency freq = (double(freq_word) / scale_factor) * codec_rate; - return freq_word; + return boost::uint32_t(freq_word); } /*! |