diff options
author | Josh Blum | 2011-02-28 17:03:47 -0800 |
---|---|---|
committer | Josh Blum | 2011-02-28 17:03:47 -0800 |
commit | 75c53194d36b4c3b02373b4feb916e6a9ad69b83 (patch) | |
tree | b771fce558db733873a35e5493dccb45a898f737 | |
parent | a02bb131f68d5aa66093310c393562671e389778 (diff) | |
download | gnuradio-75c53194d36b4c3b02373b4feb916e6a9ad69b83.tar.gz gnuradio-75c53194d36b4c3b02373b4feb916e6a9ad69b83.tar.bz2 gnuradio-75c53194d36b4c3b02373b4feb916e6a9ad69b83.zip |
uhd: only set has_time_spec when nchan > 1
Its important for multi-channel continuous,
but not wanted in single-channel non-continuous.
-rw-r--r-- | gr-uhd/lib/gr_uhd_usrp_sink.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gr-uhd/lib/gr_uhd_usrp_sink.cc b/gr-uhd/lib/gr_uhd_usrp_sink.cc index 4598e54c2..b8b99a41a 100644 --- a/gr-uhd/lib/gr_uhd_usrp_sink.cc +++ b/gr-uhd/lib/gr_uhd_usrp_sink.cc @@ -45,7 +45,8 @@ public: num_channels, num_channels, io_type.size )), _type(io_type), - _nchan(num_channels) + _nchan(num_channels), + _has_time_spec(_nchan > 1) { _dev = uhd::usrp::multi_usrp::make(device_addr); } @@ -172,7 +173,7 @@ public: //send a mid-burst packet with time spec _metadata.start_of_burst = false; _metadata.end_of_burst = false; - _metadata.has_time_spec = true; + _metadata.has_time_spec = _has_time_spec; size_t num_sent = _dev->get_device()->send( input_items, noutput_items, _metadata, @@ -189,7 +190,7 @@ public: bool start(void){ _metadata.start_of_burst = true; _metadata.end_of_burst = false; - _metadata.has_time_spec = true; + _metadata.has_time_spec = _has_time_spec; _metadata.time_spec = get_time_now() + uhd::time_spec_t(0.01); _dev->get_device()->send( @@ -217,6 +218,7 @@ protected: uhd::usrp::multi_usrp::sptr _dev; const uhd::io_type_t _type; size_t _nchan; + bool _has_time_spec; uhd::tx_metadata_t _metadata; double _sample_rate; }; |