average every minute, not second

This commit is contained in:
2025-03-29 20:05:08 +01:00
parent d2a07802b4
commit 61d0d7eb83
+2 -2
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;