diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-18 01:56:53 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-01-18 01:56:53 +0100 |
commit | cf416ef85fb07da98e61d821ea1169acf57b45f6 (patch) | |
tree | 37b13e1082be4f36cdb9809fa454a8b0fb36f9df /src/output | |
parent | 5bc2069c9636566b0f3944fabc936fd9f2133355 (diff) | |
download | dabmod-cf416ef85fb07da98e61d821ea1169acf57b45f6.tar.gz dabmod-cf416ef85fb07da98e61d821ea1169acf57b45f6.tar.bz2 dabmod-cf416ef85fb07da98e61d821ea1169acf57b45f6.zip |
UHD: use LO offset also for RX tuning
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/UHD.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/output/UHD.cpp b/src/output/UHD.cpp index c55939f..8876b0e 100644 --- a/src/output/UHD.cpp +++ b/src/output/UHD.cpp @@ -212,22 +212,30 @@ void UHD::tune(double lo_offset, double frequency) const auto tr = uhd::tune_request_t(frequency, lo_offset); uhd::tune_result_t result = m_usrp->set_tx_freq(tr); - etiLog.level(debug) << "OutputUHD:" << + etiLog.level(debug) << "OutputUHD: TX freq" << std::fixed << std::setprecision(0) << " Target RF: " << result.target_rf_freq << " Actual RF: " << result.actual_rf_freq << " Target DSP: " << result.target_dsp_freq << " Actual DSP: " << result.actual_dsp_freq; + + uhd::tune_result_t result_rx = m_usrp->set_rx_freq(tr); + + etiLog.level(debug) << "OutputUHD: RX freq" << + std::fixed << std::setprecision(0) << + " Target RF: " << result_rx.target_rf_freq << + " Actual RF: " << result_rx.actual_rf_freq << + " Target DSP: " << result_rx.target_dsp_freq << + " Actual DSP: " << result_rx.actual_dsp_freq; } else { //set the centre frequency etiLog.level(info) << std::fixed << std::setprecision(3) << "OutputUHD:Setting freq to " << frequency << "..."; m_usrp->set_tx_freq(frequency); - } - // TODO configure LO offset also for RX - m_usrp->set_rx_freq(frequency); + m_usrp->set_rx_freq(frequency); + } } double UHD::get_tx_freq(void) const |