From b984fb293c61786108615e84c782131ea23d5155 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Mon, 16 Jun 2025 10:35:57 +0200 Subject: [PATCH] change variable name --- src/fm95.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fm95.c b/src/fm95.c index 85f1158..d94c430 100644 --- a/src/fm95.c +++ b/src/fm95.c @@ -138,7 +138,7 @@ int main(int argc, char **argv) { float preemphasis_tau = DEFAULT_PREEMPHASIS_TAU; uint8_t calibration_mode = 0; - float mpx_power = DEFAULT_MPX_POWER; + float max_mpx_power = DEFAULT_MPX_POWER; float mpx_deviation = DEFAULT_MPX_DEVIATION; float master_volume = DEFAULT_MASTER_VOLUME; float audio_volume = DEFAULT_AUDIO_VOLUME; @@ -221,7 +221,7 @@ int main(int argc, char **argv) { else calibration_mode = 1; break; case 'p': // Power - mpx_power = strtof(optarg, NULL); + max_mpx_power = strtof(optarg, NULL); break; case 'P': // MPX deviation mpx_deviation = strtof(optarg, NULL); @@ -490,8 +490,8 @@ int main(int argc, char **argv) { float mpxonly_power = measure_mpx(&mpx_only_power, mpx * mpx_deviation); float mpx_power = measure_mpx(&power, (audio+mpx) * mpx_deviation); // Standard requires that the output is measured specifically - if (mpx_power > mpx_power) { - float excess_power = mpx_power - mpx_power; + if (mpx_power > max_mpx_power) { + float excess_power = mpx_power - max_mpx_power; excess_power = deviation_to_dbr(dbr_to_deviation(excess_power) - dbr_to_deviation(mpxonly_power)); if (excess_power > 0.0f && excess_power < 10.0f) {