summaryrefslogtreecommitdiff
path: root/gr-usrp2/src/usrp2_sink_32fc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gr-usrp2/src/usrp2_sink_32fc.cc')
-rw-r--r--gr-usrp2/src/usrp2_sink_32fc.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/gr-usrp2/src/usrp2_sink_32fc.cc b/gr-usrp2/src/usrp2_sink_32fc.cc
index b1e28a829..fa75b3805 100644
--- a/gr-usrp2/src/usrp2_sink_32fc.cc
+++ b/gr-usrp2/src/usrp2_sink_32fc.cc
@@ -67,12 +67,20 @@ usrp2_sink_32fc::work(int noutput_items,
return 0;
usrp2::tx_metadata metadata;
- metadata.timestamp = -1;
- metadata.send_now = 1;
+
+ // Set TX metadata to either start time or now
+ if (d_should_wait == true) {
+ metadata.timestamp = d_tx_time;
+ metadata.send_now = 0;
+ d_should_wait = false;
+ }
+ else {
+ metadata.timestamp = -1;
+ metadata.send_now = 1;
+ }
metadata.start_of_burst = 1;
- bool ok = d_u2->tx_32fc(0, // FIXME: someday, streams will have channel numbers
- in, noutput_items, &metadata);
+ bool ok = d_u2->tx_32fc(0, in, noutput_items, &metadata);
if (!ok){
std::cerr << "usrp2_sink_32fc: tx_32fc failed" << std::endl;
return -1; // say we're done