From 7c503ad1fab5fd6218847b1d030881b4d048379f Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 7 Nov 2011 14:34:40 -0800 Subject: uhd: modify examples to use new time/clock source API --- host/examples/rx_ascii_art_dft.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'host/examples/rx_ascii_art_dft.cpp') diff --git a/host/examples/rx_ascii_art_dft.cpp b/host/examples/rx_ascii_art_dft.cpp index 2e5bbba9d..cba72472a 100644 --- a/host/examples/rx_ascii_art_dft.cpp +++ b/host/examples/rx_ascii_art_dft.cpp @@ -54,7 +54,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ ("frame-rate", po::value(&frame_rate)->default_value(5), "frame rate of the display (fps)") ("ref-lvl", po::value(&ref_lvl)->default_value(0), "reference level for the display (dB)") ("dyn-rng", po::value(&dyn_rng)->default_value(60), "dynamic range for the display (dB)") - ("ref", po::value(&ref)->default_value("INTERNAL"), "waveform type (INTERNAL, EXTERNAL, MIMO)") + ("ref", po::value(&ref)->default_value("internal"), "waveform type (internal, external, mimo)") ; po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); @@ -72,18 +72,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){ uhd::usrp::multi_usrp::sptr usrp = uhd::usrp::multi_usrp::make(args); //Lock mboard clocks - if (ref == "MIMO") { - uhd::clock_config_t clock_config; - clock_config.ref_source = uhd::clock_config_t::REF_MIMO; - clock_config.pps_source = uhd::clock_config_t::PPS_MIMO; - usrp->set_clock_config(clock_config, 0); - } - else if (ref == "EXTERNAL") { - usrp->set_clock_config(uhd::clock_config_t::external(), 0); - } - else if (ref == "INTERNAL") { - usrp->set_clock_config(uhd::clock_config_t::internal(), 0); - } + usrp->set_clock_source(ref); //always select the subdevice first, the channel mapping affects the other settings if (vm.count("subdev")) usrp->set_rx_subdev_spec(subdev); -- cgit v1.2.3