aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples/tx_samples_from_file.cpp
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2014-02-04 11:04:07 -0800
committerBen Hilburn <ben.hilburn@ettus.com>2014-02-04 11:04:07 -0800
commit178ac3f1c9950d383c8f64b3df464c0f943c4a23 (patch)
tree318ed621a7b59b7d34d4ce6e4a92f73f0bcef509 /host/examples/tx_samples_from_file.cpp
parent2718ac110fa931cc29daf7cb3dc5ab6230ee02ab (diff)
downloaduhd-178ac3f1c9950d383c8f64b3df464c0f943c4a23.tar.gz
uhd-178ac3f1c9950d383c8f64b3df464c0f943c4a23.tar.bz2
uhd-178ac3f1c9950d383c8f64b3df464c0f943c4a23.zip
Merging USRP X300 and X310 support!!
Diffstat (limited to 'host/examples/tx_samples_from_file.cpp')
-rw-r--r--host/examples/tx_samples_from_file.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/host/examples/tx_samples_from_file.cpp b/host/examples/tx_samples_from_file.cpp
index 6926f8690..000f5086b 100644
--- a/host/examples/tx_samples_from_file.cpp
+++ b/host/examples/tx_samples_from_file.cpp
@@ -71,7 +71,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//variables to be set by po
std::string args, file, type, ant, subdev, ref, wirefmt;
size_t spb;
- double rate, freq, gain, bw, delay;
+ double rate, freq, gain, bw, delay, lo_off;
//setup the program options
po::options_description desc("Allowed options");
@@ -83,6 +83,7 @@ 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)")
("gain", po::value<double>(&gain), "gain for the RF chain")
("ant", po::value<std::string>(&ant), "daughterboard antenna selection")
("subdev", po::value<std::string>(&subdev), "daughterboard subdevice specification")
@@ -133,7 +134,9 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
return ~0;
}
std::cout << boost::format("Setting TX Freq: %f MHz...") % (freq/1e6) << std::endl;
- uhd::tune_request_t tune_request(freq);
+ 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);
if(vm.count("int-n")) tune_request.args = uhd::device_addr_t("mode_n=int-n");
usrp->set_tx_freq(tune_request);
std::cout << boost::format("Actual TX Freq: %f MHz...") % (usrp->get_tx_freq()/1e6) << std::endl << std::endl;