From 1e2f457ee118f55d753a4c124315ab17f8eb5f1b Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 22 Jul 2010 23:27:57 -0700 Subject: usrp: fix the N/2 cordic tune issue, use boost math sign inplace of my signum --- host/lib/usrp/tune_helper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/tune_helper.cpp') diff --git a/host/lib/usrp/tune_helper.cpp b/host/lib/usrp/tune_helper.cpp index c5cce3ecf..e516477d3 100644 --- a/host/lib/usrp/tune_helper.cpp +++ b/host/lib/usrp/tune_helper.cpp @@ -16,10 +16,10 @@ // #include -#include #include #include #include //unit_t +#include #include using namespace uhd; @@ -46,7 +46,7 @@ static tune_result_t tune_xx_subdev_and_dxc( double delta_freq = std::fmod(target_freq - actual_inter_freq, dxc_sample_rate); bool outside_of_nyquist = std::abs(delta_freq) > dxc_sample_rate/2.0; double target_dxc_freq = (outside_of_nyquist)? - std::signum(delta_freq)*dxc_sample_rate - delta_freq : -delta_freq; + boost::math::sign(delta_freq)*dxc_sample_rate - delta_freq : -delta_freq; //invert the sign on the dxc freq given the following conditions if (unit == dboard_iface::UNIT_TX) target_dxc_freq *= -1.0; -- cgit v1.2.3