summaryrefslogtreecommitdiff
path: root/usrp/host
diff options
context:
space:
mode:
authorJohnathan Corgan2010-04-16 15:32:55 -0700
committerJohnathan Corgan2010-04-16 15:32:55 -0700
commitaeba81012857f6a73c125b8d035c3c15572b3439 (patch)
treeb107fc42f149325353dad52cb77f6ae607f10dcc /usrp/host
parenta301c47751cb61116ae8f49f6b693b3ca6fbadc3 (diff)
parent23fcf0ccf9ac30a95afcbba99e478af9ce2081dc (diff)
downloadgnuradio-aeba81012857f6a73c125b8d035c3c15572b3439.tar.gz
gnuradio-aeba81012857f6a73c125b8d035c3c15572b3439.tar.bz2
gnuradio-aeba81012857f6a73c125b8d035c3c15572b3439.zip
Merge commit 'jabele/wbx_tuning'
* commit 'jabele/wbx_tuning': Fix WBX tuning to allow DDC use in reaching 50MHz
Diffstat (limited to 'usrp/host')
-rw-r--r--usrp/host/lib/db_wbxng.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/usrp/host/lib/db_wbxng.cc b/usrp/host/lib/db_wbxng.cc
index b35a9cb35..bd836dfe3 100644
--- a/usrp/host/lib/db_wbxng.cc
+++ b/usrp/host/lib/db_wbxng.cc
@@ -80,7 +80,9 @@ wbxng_base::set_freq(double freq)
actual_baseband_freq is the RF frequency that corresponds to DC in the IF.
*/
- freq_t int_freq = freq_t(freq);
+ // clamp freq
+ freq_t int_freq = freq_t(std::max(freq_min(), std::min(freq, freq_max())));
+
bool ok = d_common->_set_freq(int_freq*2);
double freq_result = (double) d_common->_get_freq()/2.0;
struct freq_result_t args = {ok, freq_result};