aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/dboard/db_wbx_version2.cpp3
-rw-r--r--host/lib/usrp/dboard/db_wbx_version3.cpp3
-rw-r--r--host/lib/usrp/dboard/db_wbx_version4.cpp3
3 files changed, 9 insertions, 0 deletions
diff --git a/host/lib/usrp/dboard/db_wbx_version2.cpp b/host/lib/usrp/dboard/db_wbx_version2.cpp
index e25cb2e4c..ad31339e7 100644
--- a/host/lib/usrp/dboard/db_wbx_version2.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version2.cpp
@@ -159,6 +159,9 @@ double wbx_base::wbx_version2::set_tx_gain(double gain, const std::string &name)
* Tuning
**********************************************************************/
double wbx_base::wbx_version2::set_lo_freq(dboard_iface::unit_t unit, double target_freq) {
+ //clip to tuning range
+ target_freq = wbx_v2_freq_range.clip(target_freq);
+
UHD_LOGV(often) << boost::format(
"WBX tune: target frequency %f Mhz"
) % (target_freq/1e6) << std::endl;
diff --git a/host/lib/usrp/dboard/db_wbx_version3.cpp b/host/lib/usrp/dboard/db_wbx_version3.cpp
index 70981ce94..1e7e448fa 100644
--- a/host/lib/usrp/dboard/db_wbx_version3.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version3.cpp
@@ -166,6 +166,9 @@ double wbx_base::wbx_version3::set_tx_gain(double gain, const std::string &name)
* Tuning
**********************************************************************/
double wbx_base::wbx_version3::set_lo_freq(dboard_iface::unit_t unit, double target_freq) {
+ //clip to tuning range
+ target_freq = wbx_v3_freq_range.clip(target_freq);
+
UHD_LOGV(often) << boost::format(
"WBX tune: target frequency %f Mhz"
) % (target_freq/1e6) << std::endl;
diff --git a/host/lib/usrp/dboard/db_wbx_version4.cpp b/host/lib/usrp/dboard/db_wbx_version4.cpp
index faaf9e3fd..cebaee2d7 100644
--- a/host/lib/usrp/dboard/db_wbx_version4.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version4.cpp
@@ -167,6 +167,9 @@ double wbx_base::wbx_version4::set_tx_gain(double gain, const std::string &name)
* Tuning
**********************************************************************/
double wbx_base::wbx_version4::set_lo_freq(dboard_iface::unit_t unit, double target_freq) {
+ //clip to tuning range
+ target_freq = wbx_v4_freq_range.clip(target_freq);
+
UHD_LOGV(often) << boost::format(
"WBX tune: target frequency %f Mhz"
) % (target_freq/1e6) << std::endl;