From 2cb6070e0976c6d07b6538b46f1b9cb22e150ffd Mon Sep 17 00:00:00 2001 From: Alexander Chemeris Date: Sat, 20 Jun 2015 00:05:51 +0300 Subject: 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 --- Transceiver52M/UHDDevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3