summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-16 01:54:59 +0000
committerJosh Blum <josh@joshknows.com>2010-07-16 01:54:59 +0000
commit076692f74e86317f337df85b222f391f541d6bbf (patch)
tree15a652def82115f59c44b2b863a0e96ede794e04 /host/lib/usrp
parenta17b6c31ecefa2f8752bb30b222eb3fa8b7d88d5 (diff)
parent8171547b6cf8eaf95901f6f4fbc47c1720caf39a (diff)
downloaduhd-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.hpp6
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);
}
/*!