From e01ee204490910b3712eb030e2d398498802128d Mon Sep 17 00:00:00 2001 From: eb Date: Thu, 24 Jul 2008 17:48:46 +0000 Subject: [PATCH] Allow odd decimation if halfband filter is disabled. Thanks Firas! git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8996 221aa14e-8319-0410-a670-987f0aec2ac5 --- usrp/host/lib/legacy/usrp_standard.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/usrp/host/lib/legacy/usrp_standard.cc b/usrp/host/lib/legacy/usrp_standard.cc index 9032874d..656bbb51 100644 --- a/usrp/host/lib/legacy/usrp_standard.cc +++ b/usrp/host/lib/legacy/usrp_standard.cc @@ -239,9 +239,17 @@ usrp_standard_rx::make (int which_board, bool usrp_standard_rx::set_decim_rate(unsigned int rate) { - if ((rate & 0x1) || rate < 4 || rate > 256){ - fprintf (stderr, "usrp_standard_rx::set_decim_rate: rate must be EVEN and in [4, 256]\n"); - return false; + if (has_rx_halfband()){ + if ((rate & 0x1) || rate < 4 || rate > 256){ + fprintf (stderr, "usrp_standard_rx::set_decim_rate: rate must be EVEN and in [4, 256]\n"); + return false; + } + } + else { + if (rate < 4 || rate > 128){ + fprintf (stderr, "usrp_standard_rx::set_decim_rate: rate must be in [4, 128]\n"); + return false; + } } d_decim_rate = rate; -- 2.47.2