path: root/Transceiver52M/radioInterface.cpp
diff options
authorTom Tsou <tom.tsou@ettus.com>2015-05-07 17:39:49 -0700
committerTom Tsou <tom@tsou.cc>2015-05-07 17:47:17 -0700
commitd7610cf0b8148391d80b8991f9f070e635a035b8 (patch)
treea2c2476caea1f84452bb89eac1fdb107a93e7ea0 /Transceiver52M/radioInterface.cpp
parent722d4f70a4085448e0c02ba3fb9a4ee6a9077118 (diff)
radioInterface: Reset sample buffer cursors on each start
Non-zero buffer indices may lead to uplink/downlink timing offset during repeated start/stop cycles. Mainly affects USRP2 and other resampled devices that rely on the buffer to absorb sample block sizes that are not multiples of the burst size. Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
Diffstat (limited to 'Transceiver52M/radioInterface.cpp')
1 files changed, 3 insertions, 0 deletions
diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp
index 369f2ac..14a4fc2 100644
--- a/Transceiver52M/radioInterface.cpp
+++ b/Transceiver52M/radioInterface.cpp
@@ -185,6 +185,9 @@ bool RadioInterface::start()
if (!mRadio->start())
return false;
+ recvCursor = 0;
+ sendCursor = 0;
writeTimestamp = mRadio->initialWriteTimestamp();
readTimestamp = mRadio->initialReadTimestamp();