mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-10-16 16:54:12 +02:00
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:
+4
-1
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user