diff options
| -rw-r--r-- | host/lib/types.cpp | 3 | ||||
| -rw-r--r-- | host/lib/usrp/tune_helper.cpp | 2 | 
2 files changed, 3 insertions, 2 deletions
| diff --git a/host/lib/types.cpp b/host/lib/types.cpp index a8062b6ae..4188568aa 100644 --- a/host/lib/types.cpp +++ b/host/lib/types.cpp @@ -70,8 +70,9 @@ tune_request_t::tune_request_t(double target_freq):  }  tune_request_t::tune_request_t(double target_freq, double lo_off): -    target_freq(target_freq + lo_off), +    target_freq(target_freq),      inter_freq_policy(POLICY_MANUAL), +    inter_freq(target_freq + lo_off),      dsp_freq_policy(POLICY_AUTO)  {      /* NOP */ diff --git a/host/lib/usrp/tune_helper.cpp b/host/lib/usrp/tune_helper.cpp index 8c57cc428..a6b615926 100644 --- a/host/lib/usrp/tune_helper.cpp +++ b/host/lib/usrp/tune_helper.cpp @@ -70,7 +70,7 @@ static tune_result_t tune_xx_subdev_and_dsp(      //------------------------------------------------------------------      //-- calculate the dsp freq, only used with automatic policy      //------------------------------------------------------------------ -    double delta_freq = std::fmod(target_inter_freq - actual_inter_freq, dsp_sample_rate); +    double delta_freq = std::fmod(tune_request.target_freq - actual_inter_freq, dsp_sample_rate);      bool outside_of_nyquist = std::abs(delta_freq) > dsp_sample_rate/2.0;      double target_dsp_freq = (outside_of_nyquist)?          boost::math::sign(delta_freq)*dsp_sample_rate - delta_freq : -delta_freq; | 
