aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-08-30 09:37:47 -0700
committerJosh Blum <josh@joshknows.com>2011-08-30 09:37:47 -0700
commit44d397dd6147a52f0c4b90ef3c3accd971f71f57 (patch)
treecafaedb124772fd3c28b8be7b924773e1216aedd /host/examples
parent50073e54b5bee27d361fba3c915be3b27c84e3b7 (diff)
downloaduhd-44d397dd6147a52f0c4b90ef3c3accd971f71f57.tar.gz
uhd-44d397dd6147a52f0c4b90ef3c3accd971f71f57.tar.bz2
uhd-44d397dd6147a52f0c4b90ef3c3accd971f71f57.zip
uhd: tweak for tx_timed_samples to pad async msg timeout
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/tx_timed_samples.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/examples/tx_timed_samples.cpp b/host/examples/tx_timed_samples.cpp
index 858de83d2..1c222d414 100644
--- a/host/examples/tx_timed_samples.cpp
+++ b/host/examples/tx_timed_samples.cpp
@@ -84,7 +84,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
md.time_spec = uhd::time_spec_t(seconds_in_future);
//the first call to send() will block this many seconds before sending:
- double timeout = seconds_in_future + 0.1; //timeout (delay before transmit + padding)
+ const double timeout = seconds_in_future + 0.1; //timeout (delay before transmit + padding)
size_t num_acc_samps = 0; //number of accumulated samples
while(num_acc_samps < total_num_samps){
@@ -117,7 +117,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
uhd::async_metadata_t async_md;
bool got_async_burst_ack = false;
//loop through all messages for the ACK packet (may have underflow messages in queue)
- while (not got_async_burst_ack and usrp->get_device()->recv_async_msg(async_md, seconds_in_future)){
+ while (not got_async_burst_ack and usrp->get_device()->recv_async_msg(async_md, timeout)){
got_async_burst_ack = (async_md.event_code == uhd::async_metadata_t::EVENT_CODE_BURST_ACK);
}
std::cout << (got_async_burst_ack? "success" : "fail") << std::endl;