mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
Changed method to check for channel in _tx_streamer_active & rx_streamer_active.
This commit is contained in:
parent
753746c8a2
commit
0ab843707d
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user