From 2eb6f7fd06c4f952ff906cbabae8e07e7b098737 Mon Sep 17 00:00:00 2001 From: Clint Chance Date: Sun, 12 Jul 2026 16:42:58 -0500 Subject: [PATCH] Initialise and reset the FM noise squelch invalid counter. m_invalidCount was missing from the constructor initialiser list and was read uninitialised in process(), making the squelch behaviour after power-up indeterminate. reset() also cleared neither hysteresis counter, so state leaked across squelch resets. --- FMNoiseSquelch.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FMNoiseSquelch.cpp b/FMNoiseSquelch.cpp index bd01fe9..dd99cf5 100644 --- a/FMNoiseSquelch.cpp +++ b/FMNoiseSquelch.cpp @@ -36,7 +36,8 @@ m_count(0U), m_q0(0), m_q1(0), m_state(false), -m_validCount(0U) +m_validCount(0U), +m_invalidCount(0U) { } @@ -127,6 +128,8 @@ void CFMNoiseSquelch::reset() m_q1 = 0; m_state = false; m_count = 0U; + m_validCount = 0U; + m_invalidCount = 0U; } #endif