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>
This commit is contained in:
parent
e692ce986c
commit
f3b9af65ed
|
@ -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);
|
uhd::tune_request_t treq(freq);
|
||||||
|
|
||||||
if (dev_type == UMTRX) {
|
if (dev_type == UMTRX) {
|
||||||
if (offset > 0.0)
|
if (offset != 0.0)
|
||||||
return uhd::tune_request_t(freq, offset);
|
return uhd::tune_request_t(freq, offset);
|
||||||
|
|
||||||
// Don't use DSP tuning, because LMS6002D PLL steps are small enough.
|
// 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.rf_freq = freq;
|
||||||
treq.dsp_freq_policy = uhd::tune_request_t::POLICY_MANUAL;
|
treq.dsp_freq_policy = uhd::tune_request_t::POLICY_MANUAL;
|
||||||
treq.dsp_freq = 0.0;
|
treq.dsp_freq = 0.0;
|
||||||
|
return treq;
|
||||||
} else if (chans == 1) {
|
} else if (chans == 1) {
|
||||||
if (offset == 0.0)
|
if (offset == 0.0)
|
||||||
return treq;
|
return treq;
|
||||||
|
|
Loading…
Reference in New Issue