From: eb Date: Thu, 24 Jul 2008 17:48:46 +0000 (+0000) Subject: Allow odd decimation if halfband filter is disabled. Thanks Firas! X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=e01ee204490910b3712eb030e2d398498802128d;p=debian%2Fgnuradio 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 --- 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;