From ec5100bf6fb140208578eae347d61a7d4a3e14fb Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 3 Feb 2017 12:01:12 +0000 Subject: [PATCH] Alter the P25 HDR start pointer calculation. --- P25RX.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/P25RX.cpp b/P25RX.cpp index e8c5e4e..61d562a 100644 --- a/P25RX.cpp +++ b/P25RX.cpp @@ -182,8 +182,7 @@ void CP25RX::processHdr(q15_t sample) } DEBUG4("P25RX, sync position in HDR, pos/min/max", m_syncPtr, m_minSyncPtr, m_maxSyncPtr); if (isSync) { - // XXX this is possibly wrong - uint16_t ptr = m_syncPtr + P25_LDU_FRAME_LENGTH_SAMPLES - P25_HDR_FRAME_LENGTH_SAMPLES - P25_SYNC_LENGTH_SAMPLES + 1U; + uint16_t ptr = m_syncPtr + P25_LDU_FRAME_LENGTH_SAMPLES - P25_HDR_FRAME_LENGTH_SAMPLES - P25_SYNC_LENGTH_SAMPLES - 1U; if (ptr >= P25_LDU_FRAME_LENGTH_SAMPLES) ptr -= P25_LDU_FRAME_LENGTH_SAMPLES;