From cca10287170e8ad50740791e7cbe715b642c2a87 Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Fri, 10 Oct 2014 17:24:40 -0700 Subject: x300,nirio: Added support for NI-RIO 14.0 - Split niriok_proxy interfaces to support NI-RIO <=13.0 and >=14.0 kernel interfaces - Fixed multi-session race conditions by synchronizing niriok_proxy access - Fixed bug switching from NI LV-FPGA access to UHD access by changing how devices are hashed into a reservation table - Fixed calculation of FRAC values for CBX and SBX LO tuning by rounding instead of truncating - Fixed bug that was not setting two MSBs for band select configuration of CBX LO - Submitting on behalf of Patrick Sisterhen, Matthew Crymble --- host/lib/usrp/common/adf435x_common.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'host/lib/usrp/common') diff --git a/host/lib/usrp/common/adf435x_common.cpp b/host/lib/usrp/common/adf435x_common.cpp index 972a69388..9b362a4d9 100644 --- a/host/lib/usrp/common/adf435x_common.cpp +++ b/host/lib/usrp/common/adf435x_common.cpp @@ -17,6 +17,7 @@ #include "adf435x_common.hpp" +#include #include #include #include @@ -96,7 +97,7 @@ adf435x_tuning_settings tune_adf435x_synth( //Fractional-N calculation MOD = 4095; //max fractional accuracy - FRAC = static_cast((feedback_freq/pfd_freq - N)*MOD); + FRAC = static_cast(boost::math::round((feedback_freq/pfd_freq - N)*MOD)); if (constraints.force_frac0) { if (FRAC > (MOD / 2)) { //Round integer such that actual freq is closest to target N++; -- cgit v1.2.3