summaryrefslogtreecommitdiff
path: root/usrp/host
diff options
context:
space:
mode:
authoreb2008-07-24 17:48:46 +0000
committereb2008-07-24 17:48:46 +0000
commite01ee204490910b3712eb030e2d398498802128d (patch)
tree7b939b47da296d93dcbb94c7d0077d9a1fc3ef03 /usrp/host
parent01668d67403cd1ee9a5626c931ad95c35c9cc5f7 (diff)
downloadgnuradio-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.cc14
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;