aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorLane Kolbly <lane.kolbly@ni.com>2021-03-09 16:27:50 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2021-03-11 09:52:18 -0600
commitbbd511dbcc3c0593ca383968c6ff2d2284f32894 (patch)
tree2b74b2cff222cc6b9998502d39457a7d4a358b57 /host/examples
parentbed66b0b6f574fc91d2093380ff7c36ce163cf50 (diff)
downloaduhd-bbd511dbcc3c0593ca383968c6ff2d2284f32894.tar.gz
uhd-bbd511dbcc3c0593ca383968c6ff2d2284f32894.tar.bz2
uhd-bbd511dbcc3c0593ca383968c6ff2d2284f32894.zip
examples: Remove unused arguments for rfnoc_radio_loopback
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/rfnoc_radio_loopback.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/host/examples/rfnoc_radio_loopback.cpp b/host/examples/rfnoc_radio_loopback.cpp
index 068433e41..bc5bc91be 100644
--- a/host/examples/rfnoc_radio_loopback.cpp
+++ b/host/examples/rfnoc_radio_loopback.cpp
@@ -42,7 +42,7 @@ void sig_int_handler(int)
int UHD_SAFE_MAIN(int argc, char* argv[])
{
// variables to be set by po
- std::string args, rx_args, tx_args, rx_ant, tx_ant, rx_blockid, tx_blockid, ref, pps;
+ std::string args, rx_ant, tx_ant, rx_blockid, tx_blockid, ref, pps;
size_t total_num_samps, spp, rx_chan, tx_chan;
double rate, rx_freq, tx_freq, rx_gain, tx_gain, rx_bw, tx_bw, total_time, setup_time;
bool rx_timestamps;
@@ -53,8 +53,6 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
desc.add_options()
("help", "help message")
("args", po::value<std::string>(&args)->default_value(""), "UHD device address args")
- ("rx_args", po::value<std::string>(&rx_args)->default_value(""), "Block args for the receive radio")
- ("tx_args", po::value<std::string>(&tx_args)->default_value(""), "Block args for the transmit radio")
("spp", po::value<size_t>(&spp)->default_value(0), "Samples per packet (reduce for lower latency)")
("rx-freq", po::value<double>(&rx_freq)->default_value(0.0), "Rx RF center frequency in Hz")
("tx-freq", po::value<double>(&tx_freq)->default_value(0.0), "Tx RF center frequency in Hz")
@@ -164,6 +162,19 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
<< std::endl
<< std::endl;
}
+ if (vm.count("tx-freq")) {
+ std::cout << boost::format("Setting TX Freq: %f MHz...") % (tx_freq / 1e6)
+ << std::endl;
+ uhd::tune_request_t tune_request(tx_freq);
+ if (vm.count("int-n")) {
+ tune_request.args = uhd::device_addr_t("mode_n=integer");
+ }
+ rx_radio_ctrl->set_tx_frequency(tx_freq, tx_chan);
+ std::cout << boost::format("Actual TX Freq: %f MHz...")
+ % (rx_radio_ctrl->get_tx_frequency(tx_chan) / 1e6)
+ << std::endl
+ << std::endl;
+ }
// set the rf gain
if (vm.count("rx-gain")) {