AM demod: fill AGC average with ones when passing squelch threshold to avoid abrupt start at squelch opening

This commit is contained in:
f4exb 2017-05-12 16:38:58 +02:00
parent f7373e8273
commit 6b4ba98e8e
2 changed files with 9 additions and 0 deletions

View File

@ -160,6 +160,10 @@ private:
{
if (m_squelchCount <= m_running.m_audioSampleRate / 10)
{
if (m_squelchCount == m_running.m_audioSampleRate / 20) {
m_volumeAGC.fill(1.0);
}
m_squelchCount++;
}
}

View File

@ -85,6 +85,11 @@ public:
m_moving_average.resize(historySize, initial);
}
void fill(double value)
{
m_moving_average.fill(value);
}
Real getValue()
{
if (m_moving_average.average() > m_clip)