From 90d00846abcd2c36e4a656a07a6d731a1a0f75b2 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Thu, 25 Aug 2016 22:36:32 +0100 Subject: [PATCH] Loosen the matching for the frame start sync pattern. --- DStarRX.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DStarRX.cpp b/DStarRX.cpp index 12fac7a..45b4258 100644 --- a/DStarRX.cpp +++ b/DStarRX.cpp @@ -325,8 +325,8 @@ void CDStarRX::processNone(bool bit) if (bit) m_patternBuffer |= 0x01U; - // Exact matching of the frame sync sequence - if (countBits32((m_patternBuffer & FRAME_SYNC_MASK) ^ FRAME_SYNC_DATA) == 0U) { + // Fuzzy matching of the frame sync sequence + if (countBits32((m_patternBuffer & FRAME_SYNC_MASK) ^ FRAME_SYNC_DATA) <= FRAME_SYNC_ERRS) { DEBUG1("DStarRX: found frame sync in None"); ::memset(m_rxBuffer, 0x00U, DSTAR_FEC_SECTION_LENGTH_BYTES);