summaryrefslogtreecommitdiff
path: root/usrp/host/lib/legacy/usrp_standard.cc
diff options
context:
space:
mode:
Diffstat (limited to 'usrp/host/lib/legacy/usrp_standard.cc')
-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;