diff options
author | Mark Meserve <mark.meserve@ni.com> | 2019-02-19 18:20:48 -0600 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-02-22 09:26:27 -0800 |
commit | a7ce066a9d09217bd7fa543fd80f916d38143504 (patch) | |
tree | 5de09bdd3167d86c648e33bd0f498b8fcade7cec /host/utils | |
parent | e0c85c9747973c1ec54d49f31cc05d07865341b7 (diff) | |
download | uhd-a7ce066a9d09217bd7fa543fd80f916d38143504.tar.gz uhd-a7ce066a9d09217bd7fa543fd80f916d38143504.tar.bz2 uhd-a7ce066a9d09217bd7fa543fd80f916d38143504.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.
Diffstat (limited to 'host/utils')
-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; |