mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-26 19:23:51 +01:00
fix issue
This commit is contained in:
@@ -7,7 +7,7 @@ void init_modulation_power_measure(MPXPowerMeasurement* mpx, int sample_rate) {
|
||||
}
|
||||
|
||||
float measure_mpx(MPXPowerMeasurement* mpx, int deviation) {
|
||||
mpx->sample += 20*log10f(deviation/19);
|
||||
mpx->sample += 20*log10f(deviation/19000.0f);
|
||||
mpx->i++;
|
||||
|
||||
if (mpx->i >= mpx->sample_rate) {
|
||||
|
||||
@@ -517,7 +517,7 @@ int main(int argc, char **argv) {
|
||||
if(sca_on) output[i] += modulate_fm(&sca_mod, hard_clip(current_sca_in, sca_clipper_threshold))*SCA_VOLUME;
|
||||
|
||||
float mpower = measure_mpx(&power, output[i]*75000);
|
||||
if(mpower > 3 && power.i == power.sample_rate) {
|
||||
if(mpower > 3) {
|
||||
printf("MPX Power over 3 dbr (%f)\n", mpower);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user