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.
This commit is contained in:
Clint Chance 2026-07-12 16:42:58 -05:00
parent a1794b44ed
commit 2eb6f7fd06
1 changed files with 4 additions and 1 deletions

View File

@ -36,7 +36,8 @@ m_count(0U),
m_q0(0), m_q0(0),
m_q1(0), m_q1(0),
m_state(false), m_state(false),
m_validCount(0U) m_validCount(0U),
m_invalidCount(0U)
{ {
} }
@ -127,6 +128,8 @@ void CFMNoiseSquelch::reset()
m_q1 = 0; m_q1 = 0;
m_state = false; m_state = false;
m_count = 0U; m_count = 0U;
m_validCount = 0U;
m_invalidCount = 0U;
} }
#endif #endif