NFM demod: adjustments to AF squelh parameters

This commit is contained in:
f4exb 2015-09-13 18:17:15 +02:00
parent e16b3a247b
commit 6b29864484
2 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ NFMDemod::NFMDemod() :
m_AGC.resize(240, m_agcLevel);
m_ctcssDetector.setCoefficients(3000, 6000.0); // 0.5s / 2 Hz resolution
m_afSquelch.setCoefficients(24, 1200, 48000.0, 4, 0); // 4000 Hz span, 250us
m_afSquelch.setCoefficients(24, 600, 48000.0, 200, 0); // 4000 Hz span, 250us, 100ms attack
DSPEngine::instance()->addAudioSink(&m_audioFifo);
}

View File

@ -197,7 +197,7 @@ bool AFSquelch::evaluate()
if (open)
{
if (m_samplesAttack && (m_attackCount < m_samplesAttack))
if ((m_samplesAttack > 0) && (m_attackCount < m_samplesAttack))
{
m_isOpen = false;
m_attackCount++;
@ -210,7 +210,7 @@ bool AFSquelch::evaluate()
}
else
{
if (m_samplesDecay && (m_decayCount < m_samplesDecay))
if ((m_samplesDecay > 0) && (m_decayCount < m_samplesDecay))
{
m_isOpen = true;
m_decayCount++;