From 94406bb12256c9861f6026c04dcc91fb8ff0a0c6 Mon Sep 17 00:00:00 2001 From: f4exb Date: Tue, 6 Dec 2016 01:59:00 +0100 Subject: [PATCH] NFM demod: improve squelch tail elimination while keeping threshold close to the signal average --- plugins/channelrx/demodnfm/nfmdemod.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/channelrx/demodnfm/nfmdemod.cpp b/plugins/channelrx/demodnfm/nfmdemod.cpp index 9fe6784eb..444b39b1c 100644 --- a/plugins/channelrx/demodnfm/nfmdemod.cpp +++ b/plugins/channelrx/demodnfm/nfmdemod.cpp @@ -172,7 +172,7 @@ void NFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto // AF processing - if (m_magsq > m_squelchLevel) + if ((m_magsq > m_squelchLevel) && (m_magsqPeak > m_magsq/2.0f)) { if (m_squelchCount < m_squelchGate) {