diff options
author | Vidush <vidush.vishwanath@ettus.com> | 2018-04-23 09:31:51 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-04-30 16:09:16 -0700 |
commit | c20678676f3f676e52e5b7f949deeafaac68ca7f (patch) | |
tree | 6b7c3287055e12518ba44f6b709d401f38cbd4b1 /host | |
parent | 8922095b2c3a8dd1c764d7b80d3128c44721597b (diff) | |
download | uhd-c20678676f3f676e52e5b7f949deeafaac68ca7f.tar.gz uhd-c20678676f3f676e52e5b7f949deeafaac68ca7f.tar.bz2 uhd-c20678676f3f676e52e5b7f949deeafaac68ca7f.zip |
Changed method to check for channel in _tx_streamer_active & rx_streamer_active.
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp b/host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp index 3858b6d84..6a1d538dc 100644 --- a/host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp +++ b/host/lib/include/uhdlib/rfnoc/radio_ctrl_impl.hpp @@ -194,11 +194,11 @@ protected: // TODO see what's protected and what's private inline bool _is_streamer_active(uhd::direction_t dir, const size_t chan) const { switch (dir) { case uhd::TX_DIRECTION: - return chan < _tx_streamer_active.size() ? _tx_streamer_active.at(chan) : false; + return _tx_streamer_active.count(chan) == 1 ? _tx_streamer_active.at(chan) : false; case uhd::RX_DIRECTION: - return chan < _rx_streamer_active.size() ? _rx_streamer_active.at(chan) : false; + return _rx_streamer_active.count(chan) == 1 ? _rx_streamer_active.at(chan) : false; case uhd::DX_DIRECTION: - return (chan < _rx_streamer_active.size() and chan < _tx_streamer_active.size()) ? + return (_tx_streamer_active.count(chan) == 1 and _rx_streamer_active.count(chan) == 1) ? _rx_streamer_active.at(chan) and _tx_streamer_active.at(chan) : false; default: return false; @@ -214,7 +214,7 @@ protected: // TODO see what's protected and what's private size_t _num_tx_channels; size_t _num_rx_channels; - + private: /************************************************************************ * Peripherals |