From c56e3f1b53f18a6be7d009cc1cb1f39db45df474 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 31 Jul 2026 17:42:22 +0100 Subject: [PATCH] Ignore parity bit --- plugins/channelrx/demodpager/pagerdemodsink.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/channelrx/demodpager/pagerdemodsink.cpp b/plugins/channelrx/demodpager/pagerdemodsink.cpp index ccd6795a0..82135d07a 100644 --- a/plugins/channelrx/demodpager/pagerdemodsink.cpp +++ b/plugins/channelrx/demodpager/pagerdemodsink.cpp @@ -304,7 +304,9 @@ void PagerDemodSink::decodeBatch() // Check parity bit bool parityError = !evenParity(m_codeWords[i], 1, 31, m_codeWords[i] & 0x1); - if (m_codeWords[i] == PAGERDEMOD_POCSAG_IDLECODE) + // The overall parity bit is preserved by bchDecode() so it can be + // reported separately. Ignore it when identifying the idle word. + if ((m_codeWords[i] & 0xfffffffeU) == (PAGERDEMOD_POCSAG_IDLECODE & 0xfffffffeU)) { // Idle } @@ -496,7 +498,8 @@ void PagerDemodSink::processOneSample(Complex &ci) m_wordCount++; // Check for sync code at start of batch - if ((m_wordCount == 1) && (correctedCW != PAGERDEMOD_POCSAG_SYNCCODE)) + if ((m_wordCount == 1) + && ((correctedCW & 0xfffffffeU) != (PAGERDEMOD_POCSAG_SYNCCODE & 0xfffffffeU))) { m_gotSOP = false; //m_thresholdMet = false;