mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
DSP moving average: corrected wrong index calculation
This commit is contained in:
parent
bc8ea82e8b
commit
c632e6e55a
@ -27,7 +27,7 @@ public:
|
||||
m_sum += value - oldest;
|
||||
oldest = value;
|
||||
|
||||
if (m_index < m_history.size()) {
|
||||
if (m_index < m_history.size() - 1) {
|
||||
m_index++;
|
||||
} else {
|
||||
m_index = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user