From d3e1d6e9be75ba8dcd21c2ed466b9e6a316625b0 Mon Sep 17 00:00:00 2001 From: natetemple Date: Fri, 22 Nov 2019 15:53:02 -0800 Subject: Examples: wrap up ref setting with option check --- host/examples/txrx_loopback_to_file.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'host/examples/txrx_loopback_to_file.cpp') diff --git a/host/examples/txrx_loopback_to_file.cpp b/host/examples/txrx_loopback_to_file.cpp index d23e9a0d2..271d249f6 100644 --- a/host/examples/txrx_loopback_to_file.cpp +++ b/host/examples/txrx_loopback_to_file.cpp @@ -285,9 +285,11 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) } // Lock mboard clocks - tx_usrp->set_clock_source(ref); - rx_usrp->set_clock_source(ref); - + if (vm.count("ref")) { + tx_usrp->set_clock_source(ref); + rx_usrp->set_clock_source(ref); + } + std::cout << boost::format("Using TX Device: %s") % tx_usrp->get_pp_string() << std::endl; std::cout << boost::format("Using RX Device: %s") % rx_usrp->get_pp_string() -- cgit v1.2.3