From 2e838250863eb7f4e0c7d3800174b8ccc8dc2da9 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 24 Jul 2018 09:55:40 -0700 Subject: x300: Enable clock_source and time_source device args You can now change the time/clock source default through device args: auto usrp = uhd::usrp::multi_usrp::make( "type=x300,clock_source=external,time_source=external"); This also enables the use of config files for the clock/time source implicitly. --- host/lib/usrp/x300/x300_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib') diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp index 22ebdf546..9b0fe9a51 100644 --- a/host/lib/usrp/x300/x300_impl.cpp +++ b/host/lib/usrp/x300/x300_impl.cpp @@ -981,7 +981,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) // setup time sources and properties //////////////////////////////////////////////////////////////////// _tree->create(mb_path / "time_source" / "value") - .set("internal") + .set(mb.args.get_time_source()) .add_coerced_subscriber([this, &mb](const std::string& time_source){ this->update_time_source(mb, time_source); }) @@ -1003,7 +1003,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr) // setup clock sources and properties //////////////////////////////////////////////////////////////////// _tree->create(mb_path / "clock_source" / "value") - .set(x300::DEFAULT_TIME_SOURCE) + .set(mb.args.get_clock_source()) .add_coerced_subscriber([this, &mb](const std::string& clock_source){ this->update_clock_source(mb, clock_source); }) -- cgit v1.2.3