diff options
author | eb | 2008-07-24 17:48:46 +0000 |
---|---|---|
committer | eb | 2008-07-24 17:48:46 +0000 |
commit | e01ee204490910b3712eb030e2d398498802128d (patch) | |
tree | 7b939b47da296d93dcbb94c7d0077d9a1fc3ef03 /usrp/host | |
parent | 01668d67403cd1ee9a5626c931ad95c35c9cc5f7 (diff) | |
download | gnuradio-e01ee204490910b3712eb030e2d398498802128d.tar.gz gnuradio-e01ee204490910b3712eb030e2d398498802128d.tar.bz2 gnuradio-e01ee204490910b3712eb030e2d398498802128d.zip |
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
Diffstat (limited to 'usrp/host')
-rw-r--r-- | usrp/host/lib/legacy/usrp_standard.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/usrp/host/lib/legacy/usrp_standard.cc b/usrp/host/lib/legacy/usrp_standard.cc index 9032874d1..656bbb51f 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; |