diff options
author | Jason Abele <jason@ettus.com> | 2011-07-08 12:56:29 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-07-08 14:52:38 -0700 |
commit | 7bc972a81ff9ba5e2568f4132346e806d6b8257a (patch) | |
tree | fb6f90de269375bfe7dabfd87043eeedaa923a5e /host/lib/usrp | |
parent | f60450529c0d6b7e36787493beec3f07af6fd007 (diff) | |
download | uhd-7bc972a81ff9ba5e2568f4132346e806d6b8257a.tar.gz uhd-7bc972a81ff9ba5e2568f4132346e806d6b8257a.tar.bz2 uhd-7bc972a81ff9ba5e2568f4132346e806d6b8257a.zip |
Fix rounding in DBSRX2 tuning
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/dboard/db_dbsrx2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp index 93bab5aec..f19236907 100644 --- a/host/lib/usrp/dboard/db_dbsrx2.cpp +++ b/host/lib/usrp/dboard/db_dbsrx2.cpp @@ -229,7 +229,7 @@ void dbsrx2::set_lo_freq(double target_freq){ N = (target_freq*R*ext_div)/(ref_freq); //actual spec range is (19, 251) intdiv = int(std::floor(N)); // if (intdiv < 19 or intdiv > 251) continue; - fracdiv = boost::math::iround((N - intdiv)*double(1 << 20)); + fracdiv = std::floor((N - intdiv)*double(1 << 20)); //calculate the actual freq from the values above N = double(intdiv) + double(fracdiv)/double(1 << 20); |