diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-06-18 18:25:30 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-08-02 12:37:34 -0700 |
commit | fab3dc52d75d8f07d629da220f260b5c48369ef7 (patch) | |
tree | ed728bc189ff33327c4d6d8a7ccac0f235f608b6 /host/lib | |
parent | 065740babdea2cac56473db040cd67b84f3fa598 (diff) | |
download | uhd-fab3dc52d75d8f07d629da220f260b5c48369ef7.tar.gz uhd-fab3dc52d75d8f07d629da220f260b5c48369ef7.tar.bz2 uhd-fab3dc52d75d8f07d629da220f260b5c48369ef7.zip |
mpmd: Allow setting time_source and clock_source props
Before, setting these properties in the prop tree would trigger an
exception.
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_prop_tree.cpp | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_prop_tree.cpp b/host/lib/usrp/mpmd/mpmd_prop_tree.cpp index 9f6fdd1a3..af0a03ff3 100644 --- a/host/lib/usrp/mpmd/mpmd_prop_tree.cpp +++ b/host/lib/usrp/mpmd/mpmd_prop_tree.cpp @@ -112,18 +112,9 @@ void mpmd_impl::init_property_tree( /*** Clocking *******************************************************/ tree->create<std::string>(mb_path / "clock_source/value") .add_coerced_subscriber([mb](const std::string &clock_source){ - // FIXME: Undo these changes - //mb->rpc->notify_with_token("set_clock_source", clock_source); - auto current_src = mb->rpc->request_with_token<std::string>( - "get_clock_source" - ); - if (current_src != clock_source) { - UHD_LOG_WARNING("MPMD", - "Setting clock source at runtime is currently not " - "supported. Use clock_source=XXX as a device arg to " - "select a clock source. The current source is: " - << current_src); - } + mb->set_timeout_init(); + mb->rpc->notify_with_token("set_clock_source", clock_source); + mb->set_timeout_default(); }) .set_publisher([mb](){ return mb->rpc->request_with_token<std::string>( @@ -141,18 +132,7 @@ void mpmd_impl::init_property_tree( ; tree->create<std::string>(mb_path / "time_source/value") .add_coerced_subscriber([mb](const std::string &time_source){ - //mb->rpc->notify_with_token("set_time_source", time_source); - // FIXME: Undo these changes - auto current_src = mb->rpc->request_with_token<std::string>( - "get_time_source" - ); - if (current_src != time_source) { - UHD_LOG_WARNING("MPMD", - "Setting time source at runtime is currently not " - "supported. Use time_source=XXX as a device arg to " - "select a time source. The current source is: " - << current_src); - } + mb->rpc->notify_with_token("set_time_source", time_source); }) .set_publisher([mb](){ return mb->rpc->request_with_token<std::string>( |