diff options
author | Mark Meserve <mark.meserve@ni.com> | 2019-02-19 18:20:48 -0600 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-02-21 16:16:06 -0800 |
commit | 3665242c33f0c8ca6fd7059d596e4c7976242858 (patch) | |
tree | 5b55a5d1b1354583735ee8e7578d2e52ada8d3be | |
parent | 1e5674967d4db2d4742794bbae1ae56ac3619fdd (diff) | |
download | uhd-3665242c33f0c8ca6fd7059d596e4c7976242858.tar.gz uhd-3665242c33f0c8ca6fd7059d596e4c7976242858.tar.bz2 uhd-3665242c33f0c8ca6fd7059d596e4c7976242858.zip |
uhd: set tx gain to max for rx iq cal
- The other cal utilities (TX IQ and TX DC) already do this.
- This fixes calibration for certain frequencies on N320/N321.
- Old calibration data is still valid after this change.
-rw-r--r-- | host/utils/uhd_cal_rx_iq_balance.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/host/utils/uhd_cal_rx_iq_balance.cpp b/host/utils/uhd_cal_rx_iq_balance.cpp index a90e37651..c68c96173 100644 --- a/host/utils/uhd_cal_rx_iq_balance.cpp +++ b/host/utils/uhd_cal_rx_iq_balance.cpp @@ -28,10 +28,15 @@ namespace po = boost::program_options; /*********************************************************************** * Transmit thread **********************************************************************/ -static void tx_thread(uhd::tx_streamer::sptr tx_stream, const double tx_wave_ampl) +static void tx_thread(uhd::usrp::multi_usrp::sptr usrp, + uhd::tx_streamer::sptr tx_stream, + const double tx_wave_ampl) { uhd::set_thread_priority_safe(); + // set max TX gain + usrp->set_tx_gain(usrp->get_tx_gain_range().stop()); + // setup variables and allocate buffer uhd::tx_metadata_t md; md.has_time_spec = false; @@ -139,7 +144,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) // create a transmitter thread boost::thread_group threads; - threads.create_thread(boost::bind(&tx_thread, tx_stream, tx_wave_ampl)); + threads.create_thread(boost::bind(&tx_thread, usrp, tx_stream, tx_wave_ampl)); // re-usable buffer for samples std::vector<samp_type> buff; |