diff options
author | Jason Abele <jason@ettus.com> | 2011-07-08 12:56:29 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-07-08 15:16:29 -0700 |
commit | ba0e3c8dcc90ea3e4cf015dea1038cb51a89b159 (patch) | |
tree | 7d2be167c0dd1bc75a0749c72ab0a16f9e122ac1 | |
parent | a3e1cb78b4c9791fbd3703d632cf22fa4005ee6c (diff) | |
download | uhd-ba0e3c8dcc90ea3e4cf015dea1038cb51a89b159.tar.gz uhd-ba0e3c8dcc90ea3e4cf015dea1038cb51a89b159.tar.bz2 uhd-ba0e3c8dcc90ea3e4cf015dea1038cb51a89b159.zip |
Fix rounding in DBSRX2 tuning
-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 aaced7a5d..f646a238f 100644 --- a/host/lib/usrp/dboard/db_dbsrx2.cpp +++ b/host/lib/usrp/dboard/db_dbsrx2.cpp @@ -230,7 +230,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); |