diff options
author | Philip Balister <philip@opensdr.com> | 2010-08-19 20:34:56 +0000 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2010-08-19 20:34:56 +0000 |
commit | 38722979512f0f6d57db9fd5e314b94cad1f188e (patch) | |
tree | d0cc4981b799369ec9f00ce059f527e761983994 /host/examples | |
parent | f568f651c423fca8c9cf607655ea50ac4cfab524 (diff) | |
download | uhd-38722979512f0f6d57db9fd5e314b94cad1f188e.tar.gz uhd-38722979512f0f6d57db9fd5e314b94cad1f188e.tar.bz2 uhd-38722979512f0f6d57db9fd5e314b94cad1f188e.zip |
Add gain command line parameter.
Diffstat (limited to 'host/examples')
-rw-r--r-- | host/examples/tx_timed_samples.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/host/examples/tx_timed_samples.cpp b/host/examples/tx_timed_samples.cpp index fa5bf4b2b..f7d7ea2ca 100644 --- a/host/examples/tx_timed_samples.cpp +++ b/host/examples/tx_timed_samples.cpp @@ -35,6 +35,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ size_t samps_per_packet; double tx_rate, freq; float ampl; + float tx_gain; //setup the program options po::options_description desc("Allowed options"); @@ -47,6 +48,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("txrate", po::value<double>(&tx_rate)->default_value(100e6/16), "rate of outgoing samples") ("freq", po::value<double>(&freq)->default_value(0), "rf center frequency in Hz") ("ampl", po::value<float>(&l)->default_value(float(0.3)), "amplitude of each sample") + ("gain", po::value<float>(&tx_gain)->default_value(float(0)), "TX Gain setting") ("dilv", "specify to disable inner-loop verbose") ; po::variables_map vm; @@ -75,7 +77,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ std::cout << boost::format("Setting device timestamp to 0...") << std::endl; sdev->set_tx_freq(freq); sdev->set_time_now(uhd::time_spec_t(0.0)); - sdev->set_tx_gain(0); + sdev->set_tx_gain(tx_gain); //allocate data to send std::vector<std::complex<short> > buff(samps_per_packet, std::complex<short>(ampl, ampl)); |