From d7610cf0b8148391d80b8991f9f070e635a035b8 Mon Sep 17 00:00:00 2001 From: Tom Tsou Date: Thu, 7 May 2015 17:39:49 -0700 Subject: 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 --- Transceiver52M/radioInterface.cpp | 3 +++ 1 file changed, 3 insertions(+) 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(); -- cgit v1.2.1