aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp')
-rw-r--r--host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
index 3fd32bda9..d27531a2b 100644
--- a/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/dboard/magnesium/magnesium_radio_ctrl_impl.cpp
@@ -206,10 +206,10 @@ void magnesium_radio_ctrl_impl::set_rx_antenna(
}
double magnesium_radio_ctrl_impl::set_tx_frequency(
- const double freq,
+ const double req_freq,
const size_t chan
) {
- // FIXME bounds checking + clipping!!!
+ const double freq = MAGNESIUM_FREQ_RANGE.clip(req_freq);
UHD_LOG_TRACE(unique_id(),
"set_tx_frequency(f=" << freq << ", chan=" << chan << ")");
_desired_rf_freq[TX_DIRECTION]=freq;
@@ -289,10 +289,10 @@ void magnesium_radio_ctrl_impl::_update_freq(
}
double magnesium_radio_ctrl_impl::set_rx_frequency(
- const double freq,
+ const double req_freq,
const size_t chan
) {
- // FIXME bounds checking + clipping!!!
+ const double freq = MAGNESIUM_FREQ_RANGE.clip(req_freq);
UHD_LOG_TRACE(unique_id(),
"set_rx_frequency(f=" << freq << ", chan=" << chan << ")");
_desired_rf_freq[RX_DIRECTION]=freq;