diff options
author | natetemple <nate.temple@ettus.com> | 2019-01-09 11:26:06 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-10 09:47:33 -0800 |
commit | b5e80dfb2a67e525283fd05e05c9b4821c15843b (patch) | |
tree | 6114c3a5edaa2cdcd6e0e0fa9d4c4c2772c62336 | |
parent | 75ea70537875042f6ba683799963397ae5802742 (diff) | |
download | uhd-b5e80dfb2a67e525283fd05e05c9b4821c15843b.tar.gz uhd-b5e80dfb2a67e525283fd05e05c9b4821c15843b.tar.bz2 uhd-b5e80dfb2a67e525283fd05e05c9b4821c15843b.zip |
Examples: update lo-offset naming in tx from file
Update tx_samples_from_file lo-offset naming convention
-rw-r--r-- | host/examples/tx_samples_from_file.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/host/examples/tx_samples_from_file.cpp b/host/examples/tx_samples_from_file.cpp index 108ab4230..23c55cf25 100644 --- a/host/examples/tx_samples_from_file.cpp +++ b/host/examples/tx_samples_from_file.cpp @@ -56,7 +56,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ //variables to be set by po std::string args, file, type, ant, subdev, ref, wirefmt, channel; size_t spb; - double rate, freq, gain, bw, delay, lo_off; + double rate, freq, gain, bw, delay, lo_offset; //setup the program options po::options_description desc("Allowed options"); @@ -68,7 +68,10 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("spb", po::value<size_t>(&spb)->default_value(10000), "samples per buffer") ("rate", po::value<double>(&rate), "rate of outgoing samples") ("freq", po::value<double>(&freq), "RF center frequency in Hz") - ("lo_off", po::value<double>(&lo_off), "Offset for frontend LO in Hz (optional)") + ("lo-offset", po::value<double>(&lo_offset)->default_value(0.0), + "Offset for frontend LO in Hz (optional)") + ("lo_off", po::value<double>(&lo_offset), + "(DEPRECATED) will go away soon! Use --lo-offset instead") ("gain", po::value<double>(&gain), "gain for the RF chain") ("ant", po::value<std::string>(&ant), "antenna selection") ("subdev", po::value<std::string>(&subdev), "subdevice specification") @@ -120,9 +123,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ return ~0; } std::cout << boost::format("Setting TX Freq: %f MHz...") % (freq/1e6) << std::endl; + std::cout << boost::format("Setting TX LO Offset: %f MHz...") % (lo_offset/1e6) << std::endl; uhd::tune_request_t tune_request; - if(vm.count("lo_off")) tune_request = uhd::tune_request_t(freq, lo_off); - else tune_request = uhd::tune_request_t(freq); + tune_request = uhd::tune_request_t(freq, lo_offset); if(vm.count("int-n")) tune_request.args = uhd::device_addr_t("mode_n=integer"); usrp->set_tx_freq(tune_request); std::cout << boost::format("Actual TX Freq: %f MHz...") % (usrp->get_tx_freq()/1e6) << std::endl << std::endl; |