From a59404345ecf95a04b48088bcb04e7a76a2c9bae Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 23 Apr 2016 10:16:15 +0200 Subject: [PATCH] DSD + NFM demods: re-itinitalize squelch open count when squelch gate changes --- plugins/channel/demoddsd/dsddemod.cpp | 1 + plugins/channel/demodnfm/nfmdemod.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/channel/demoddsd/dsddemod.cpp b/plugins/channel/demoddsd/dsddemod.cpp index cda32efb5..4ddebf5eb 100644 --- a/plugins/channel/demoddsd/dsddemod.cpp +++ b/plugins/channel/demoddsd/dsddemod.cpp @@ -274,6 +274,7 @@ void DSDDemod::apply() if (m_config.m_squelchGate != m_running.m_squelchGate) { m_squelchGate = 480 * m_config.m_squelchGate; // gate is given in 10s of ms at 48000 Hz audio sample rate + m_squelchCount = 0; // reset squelch open counter } if (m_config.m_squelch != m_running.m_squelch) diff --git a/plugins/channel/demodnfm/nfmdemod.cpp b/plugins/channel/demodnfm/nfmdemod.cpp index 9b78629c7..a40b5a1a1 100644 --- a/plugins/channel/demodnfm/nfmdemod.cpp +++ b/plugins/channel/demodnfm/nfmdemod.cpp @@ -362,6 +362,7 @@ void NFMDemod::apply() { m_agcAttack = 480 * m_config.m_squelchGate; // gate is given in 10s of ms at 48000 Hz audio sample rate m_AGC.resize(m_agcAttack, m_agcLevel); + m_squelchCount = 0; // reset squelch open counter } if (m_config.m_squelch != m_running.m_squelch)