SSB demod: exchange up and down step counter values when the threshold state changes to avoid restarting from 0 or step length when state changes rapidly

pull/60/head
f4exb 2017-07-26 17:50:17 +02:00
rodzic e17a815125
commit 7acc42436a
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -102,7 +102,7 @@ double MagSquaredAGC::feedAndGetValue(const Complex& ci)
if (m_count < m_moving_average.historySize())
{
m_stepDownCounter = m_stepLength;
m_stepDownCounter = m_stepUpCounter;
if (m_stepUpCounter < m_stepLength)
{
@ -116,7 +116,7 @@ double MagSquaredAGC::feedAndGetValue(const Complex& ci)
}
else
{
m_stepUpCounter = 0;
m_stepUpCounter = m_stepDownCounter;
if (m_stepDownCounter > 0)
{
@ -192,7 +192,7 @@ double MagAGC::feedAndGetValue(const Complex& ci)
if (m_count < m_moving_average.historySize())
{
m_stepDownCounter = m_stepLength;
m_stepDownCounter = m_stepUpCounter;
if (m_stepUpCounter < m_stepLength)
{
@ -206,7 +206,7 @@ double MagAGC::feedAndGetValue(const Complex& ci)
}
else
{
m_stepUpCounter = 0;
m_stepUpCounter = m_stepDownCounter;
if (m_stepDownCounter > 0)
{