diff options
Diffstat (limited to 'host/lib')
| -rw-r--r-- | host/lib/usrp/b200/b200_impl.cpp | 21 | 
1 files changed, 10 insertions, 11 deletions
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index 239bd97b1..a173c68f8 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -795,15 +795,6 @@ b200_impl::~b200_impl(void)  /***********************************************************************   * setup radio control objects   **********************************************************************/ - -void lambda_set_bool_prop(boost::weak_ptr<property_tree> tree_wptr, fs_path path, bool value, double) -{ -    property_tree::sptr tree = tree_wptr.lock(); -    if (tree) { -        tree->access<bool>(path).set(value); -    } -} -  void b200_impl::setup_radio(const size_t dspno)  {      radio_perifs_t &perif = _radio_perifs[dspno]; @@ -862,7 +853,11 @@ void b200_impl::setup_radio(const size_t dspno)      _tree->create<bool>(rx_dsp_path / "rate" / "set").set(false);      _tree->access<double>(rx_dsp_path / "rate" / "value")          .set_coercer(boost::bind(&b200_impl::coerce_rx_samp_rate, this, perif.ddc, dspno, _1)) -        .add_coerced_subscriber(boost::bind(&lambda_set_bool_prop, boost::weak_ptr<property_tree>(_tree), rx_dsp_path / "rate" / "set", true, _1)) +        .add_coerced_subscriber([this](const double){ +            if (this->_tree) { +                _tree->access<bool>(rx_dsp_path / "rate" / "set").set(true); +            } +        })          .add_coerced_subscriber(boost::bind(&b200_impl::update_rx_samp_rate, this, dspno, _1))      ;      _tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd") @@ -880,7 +875,11 @@ void b200_impl::setup_radio(const size_t dspno)      _tree->create<bool>(tx_dsp_path / "rate" / "set").set(false);      _tree->access<double>(tx_dsp_path / "rate" / "value")          .set_coercer(boost::bind(&b200_impl::coerce_tx_samp_rate, this, perif.duc, dspno, _1)) -        .add_coerced_subscriber(boost::bind(&lambda_set_bool_prop, boost::weak_ptr<property_tree>(_tree), tx_dsp_path / "rate" / "set", true, _1)) +        .add_coerced_subscriber([this](const double){ +            if (this->_tree) { +                tree->access<bool>(tx_dsp_path / "rate" / "set").set(true); +            } +        })          .add_coerced_subscriber(boost::bind(&b200_impl::update_tx_samp_rate, this, dspno, _1))      ;      _tree->access<double>(mb_path / "tick_rate")  | 
