aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-08-29 09:43:54 -0700
committerJosh Blum <josh@joshknows.com>2011-08-29 16:49:06 -0700
commit78e95562617d084d6bd83227a676f62bb552b26d (patch)
treeff7b59f5379c91f4d7e2f779b4fd9483b174bccf
parent1d842e0767040fca346abcdc52861b214225ea13 (diff)
downloaduhd-78e95562617d084d6bd83227a676f62bb552b26d.tar.gz
uhd-78e95562617d084d6bd83227a676f62bb552b26d.tar.bz2
uhd-78e95562617d084d6bd83227a676f62bb552b26d.zip
usrp: preserve sub-ranges when calculating overall tune range
-rw-r--r--host/lib/usrp/multi_usrp.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index d0141108e..1a1bd0967 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -70,11 +70,15 @@ static meta_range_t make_overall_tune_range(
const meta_range_t &dsp_range,
const double bw
){
- return meta_range_t(
- fe_range.start() + std::max(dsp_range.start(), -bw),
- fe_range.stop() + std::min(dsp_range.stop(), bw),
- dsp_range.step()
- );
+ meta_range_t range;
+ BOOST_FOREACH(const range_t &sub_range, fe_range){
+ range.push_back(range_t(
+ sub_range.start() + std::max(dsp_range.start(), -bw),
+ sub_range.stop() + std::min(dsp_range.stop(), bw),
+ dsp_range.step()
+ ));
+ }
+ return range;
}
/***********************************************************************