diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2015-06-20 00:05:51 +0300 |
---|---|---|
committer | Tom Tsou <tom.tsou@ettus.com> | 2015-07-30 14:23:24 -0700 |
commit | f3b9af65ed1709f19bc6c00e2a6a9514f4215570 (patch) | |
tree | cf4cc69630d4741d14e2aab09276ebbf347e9585 | |
parent | e692ce986cebe7434bcca589df5440a6c5fc4d5b (diff) |
uhd: Fix UmTRX tuning broken in commit 90f7a01d.
Commit 90f7a01d lost "return" statement. We also should account the fact that
offset can be negative.
We should return the tuning request immediately after
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
-rw-r--r-- | Transceiver52M/UHDDevice.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 272ce60..b49b1be 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -1114,7 +1114,7 @@ uhd::tune_request_t uhd_device::select_freq(double freq, size_t chan, bool tx) uhd::tune_request_t treq(freq); if (dev_type == UMTRX) { - if (offset > 0.0) + if (offset != 0.0) return uhd::tune_request_t(freq, offset); // Don't use DSP tuning, because LMS6002D PLL steps are small enough. @@ -1125,6 +1125,7 @@ uhd::tune_request_t uhd_device::select_freq(double freq, size_t chan, bool tx) treq.rf_freq = freq; treq.dsp_freq_policy = uhd::tune_request_t::POLICY_MANUAL; treq.dsp_freq = 0.0; + return treq; } else if (chans == 1) { if (offset == 0.0) return treq; |