mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-26 11:22:00 +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++);
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user