From 62b267412ebe63ae0794af386e94d05647f1e5ad Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Wed, 29 Oct 2014 17:03:04 -0700 Subject: UHD Tune: Clipping RF LO freq to FE's range in MANUAL tune. --- host/lib/usrp/multi_usrp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index ac1ec116c..0c128dd22 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -242,6 +242,7 @@ static tune_result_t tune_xx_subdev_and_dsp( ); freq_range_t dsp_range = dsp_subtree->access("freq/range").get(); + freq_range_t rf_range = rf_fe_subtree->access("freq/range").get(); double clipped_requested_freq = tune_range.clip(tune_request.target_freq); @@ -281,6 +282,7 @@ static tune_result_t tune_xx_subdev_and_dsp( //-- set the RF frequency depending upon the policy //------------------------------------------------------------------ double target_rf_freq = 0.0; + switch (tune_request.rf_freq_policy){ case tune_request_t::POLICY_AUTO: target_rf_freq = clipped_requested_freq + lo_offset; @@ -297,7 +299,7 @@ static tune_result_t tune_xx_subdev_and_dsp( .set(tune_request.rf_freq - tune_request.target_freq); } - target_rf_freq = tune_request.rf_freq; + target_rf_freq = rf_range.clip(tune_request.rf_freq); break; case tune_request_t::POLICY_NONE: -- cgit v1.2.3