diff options
author | Ben Hilburn <ben.hilburn@ettus.com> | 2014-10-29 17:03:04 -0700 |
---|---|---|
committer | Ben Hilburn <ben.hilburn@ettus.com> | 2014-10-29 17:03:04 -0700 |
commit | 62b267412ebe63ae0794af386e94d05647f1e5ad (patch) | |
tree | ceef836828a85fd401a0f612eb03b27f6160f56c | |
parent | 57028ded0d685d1e102eea051781c34cc0b7c809 (diff) | |
download | uhd-62b267412ebe63ae0794af386e94d05647f1e5ad.tar.gz uhd-62b267412ebe63ae0794af386e94d05647f1e5ad.tar.bz2 uhd-62b267412ebe63ae0794af386e94d05647f1e5ad.zip |
UHD Tune: Clipping RF LO freq to FE's range in MANUAL tune.
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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<meta_range_t>("freq/range").get(); + freq_range_t rf_range = rf_fe_subtree->access<meta_range_t>("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: |