1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 09:48:45 -05:00

DSP moving average: corrected wrong index calculation

This commit is contained in:
f4exb 2018-02-15 16:35:43 +01:00
parent bc8ea82e8b
commit c632e6e55a

View File

@ -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;