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:
@@ -11,8 +11,8 @@ float measure_mpx(MPXPowerMeasurement* mpx, int deviation) {
|
|||||||
|
|
||||||
float modulation_power = mpx->sample/(mpx->i++);
|
float modulation_power = mpx->sample/(mpx->i++);
|
||||||
|
|
||||||
if (mpx->i >= mpx->sample_rate) {
|
if (mpx->i >= mpx->sample_rate*60) {
|
||||||
mpx->sample = modulation_power;
|
mpx->sample = 0;
|
||||||
mpx->i = 0;
|
mpx->i = 0;
|
||||||
}
|
}
|
||||||
return modulation_power;
|
return modulation_power;
|
||||||
|
|||||||
Reference in New Issue
Block a user