diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2015-04-09 18:55:02 +0300 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2015-05-07 22:23:51 -0400 |
commit | 8974a801927100a7657fd973c5b098289ac6f35f (patch) | |
tree | e75d511c3a806de759febdbb89557b8739964161 | |
parent | 63cd7705a9bf04e33f33fb26f25ef23a23a1e9a6 (diff) |
umtrx: Don't use DSP tuning, because LMS6002D PLL steps are small enough.
We end up with DSP tuning just for 2-3Hz, which is meaningless and
only distort the signal.
-rw-r--r-- | Transceiver52M/UHDDevice.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 68d5217..0ff23ae 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -1059,7 +1059,19 @@ uhd::tune_request_t uhd_device::select_freq(double freq, size_t chan, bool tx) std::vector<double> freqs; uhd::tune_request_t treq(freq); - if ((chans == 1) || ((chans == 2) && dev_type == UMTRX)) { + if (dev_type == UMTRX) { + if (offset > 0.0) + return uhd::tune_request_t(freq, offset); + + // Don't use DSP tuning, because LMS6002D PLL steps are small enough. + // We end up with DSP tuning just for 2-3Hz, which is meaningless and + // only distort the signal (because cordic is not ideal). + treq.target_freq = freq; + treq.rf_freq_policy = uhd::tune_request_t::POLICY_MANUAL; + treq.rf_freq = freq; + treq.dsp_freq_policy = uhd::tune_request_t::POLICY_MANUAL; + treq.dsp_freq = 0.0; + } else if (chans == 1) { if (offset == 0.0) return treq; |