0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 19:23:51 +01:00

average every minute, not second

This commit is contained in:
2025-03-29 20:05:08 +01:00
parent d2a07802b4
commit 61d0d7eb83

View File

@@ -11,8 +11,8 @@ float measure_mpx(MPXPowerMeasurement* mpx, int deviation) {
float modulation_power = mpx->sample/(mpx->i++);
if (mpx->i >= mpx->sample_rate) {
mpx->sample = modulation_power;
if (mpx->i >= mpx->sample_rate*60) {
mpx->sample = 0;
mpx->i = 0;
}
return modulation_power;