From f969650555e1fbf87548d861e6b5126e8a641b3e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 11 Sep 2012 12:58:28 -0700 Subject: usrp: fix rx dsp core scaling factor off by 2 The scale factor is a 18 bit number, this should be 1 << 17 --- host/lib/usrp/cores/rx_dsp_core_200.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp index cf8db1927..a9b7d8672 100644 --- a/host/lib/usrp/cores/rx_dsp_core_200.cpp +++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp @@ -184,7 +184,7 @@ public: } void update_scalar(void){ - const double target_scalar = (1 << 16)*_scaling_adjustment/_dsp_extra_scaling; + const double target_scalar = (1 << 17)*_scaling_adjustment/_dsp_extra_scaling; const boost::int32_t actual_scalar = boost::math::iround(target_scalar); _fxpt_scalar_correction = target_scalar/actual_scalar; //should be small _iface->poke32(REG_DSP_RX_SCALE_IQ, actual_scalar); -- cgit v1.2.3