diff options
| author | Derek Kozel <derek.kozel@gmail.com> | 2017-01-25 00:42:36 -0800 | 
|---|---|---|
| committer | Martin Braun <martin.braun@ettus.com> | 2017-01-26 08:37:25 +0100 | 
| commit | be4dda6d4666988fc8624bd336a22ee6d1a82f59 (patch) | |
| tree | 944654d2d9c975a2140e4ed3b6de6411a5d8d02f /host/lib | |
| parent | b99f94f65040363b25dc2db18b1d2b6a8575457f (diff) | |
| download | uhd-be4dda6d4666988fc8624bd336a22ee6d1a82f59.tar.gz uhd-be4dda6d4666988fc8624bd336a22ee6d1a82f59.tar.bz2 uhd-be4dda6d4666988fc8624bd336a22ee6d1a82f59.zip  | |
X300: Move property tree check to subscriber
Command Time path in the daughterboard does not yet exist during X300
initialization, so check cannot be done while subscribing.
Diffstat (limited to 'host/lib')
| -rw-r--r-- | host/lib/usrp/x300/x300_radio_ctrl_impl.cpp | 11 | 
1 files changed, 6 insertions, 5 deletions
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp index bb17eb2ec..0e11cb42c 100644 --- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp +++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp @@ -126,8 +126,7 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(x300_radio_ctrl)          // Bind the daughterboard command time to the motherboard level property          //////////////////////////////////////////////////////////////// -        if (_tree->exists(fs_path("time") / "cmd") and -                _tree->exists(fs_path("dboards" / _radio_slot /  "rx_frontends" / _rx_fe_map.at(i).db_fe_name / "time" / "cmd"))) { +        if (_tree->exists(fs_path("time") / "cmd")) {              _tree->access<time_spec_t>(fs_path("time") / "cmd")                  .add_coerced_subscriber(boost::bind(&x300_radio_ctrl_impl::set_fe_cmd_time, this, _1, i));          } @@ -180,9 +179,11 @@ double x300_radio_ctrl_impl::set_rate(double rate)  void x300_radio_ctrl_impl::set_fe_cmd_time(const time_spec_t &time, const size_t chan)  { -    _tree->access<time_spec_t>( -            fs_path("dboards" / _radio_slot /  "rx_frontends" / _rx_fe_map.at(chan).db_fe_name / "time" / "cmd") -    ).set(time); +    if (_tree->exists(fs_path("dboards" / _radio_slot /  "rx_frontends" / _rx_fe_map.at(chan).db_fe_name / "time" / "cmd"))) { +        _tree->access<time_spec_t>( +                fs_path("dboards" / _radio_slot /  "rx_frontends" / _rx_fe_map.at(chan).db_fe_name / "time" / "cmd") +        ).set(time); +    }  }  void x300_radio_ctrl_impl::set_tx_antenna(const std::string &ant, const size_t chan)  | 
