From 21535c9ca087893a28c1dc5cdce915969e57fa0d Mon Sep 17 00:00:00 2001 From: Krzysiek Egzmont Date: Fri, 3 Nov 2023 12:18:31 +0100 Subject: [PATCH] Don't use AM fix for USB/BYP/RAW --- app/app.c | 6 +++--- ui/main.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/app.c b/app/app.c index a8dc167..23a40db 100644 --- a/app/app.c +++ b/app/app.c @@ -71,7 +71,7 @@ static void UpdateRSSI(const int vfo) #ifdef ENABLE_AM_FIX // add RF gain adjust compensation - if (gEeprom.VfoInfo[vfo].Modulation != MODULATION_FM && gSetting_AM_fix) + if (gEeprom.VfoInfo[vfo].Modulation == MODULATION_AM && gSetting_AM_fix) rssi -= rssi_gain_diff[vfo]; #endif @@ -526,7 +526,7 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix) const uint8_t orig_pga = 6; // -3dB #ifdef ENABLE_AM_FIX - if (gRxVfo->Modulation != MODULATION_FM && gSetting_AM_fix) { // AM RX mode + if (gRxVfo->Modulation == MODULATION_AM && gSetting_AM_fix) { // AM RX mode if (reset_am_fix) AM_fix_reset(chan); // TODO: only reset it when moving channel/frequency AM_fix_10ms(chan); @@ -1211,7 +1211,7 @@ void APP_TimeSlice10ms(void) #ifdef ENABLE_AM_FIX // if (gEeprom.VfoInfo[gEeprom.RX_VFO].Modulation != MODULATION_FM && gSetting_AM_fix) - if (gRxVfo->Modulation != MODULATION_FM && gSetting_AM_fix) + if (gRxVfo->Modulation == MODULATION_AM && gSetting_AM_fix) AM_fix_10ms(gEeprom.RX_VFO); #endif diff --git a/ui/main.c b/ui/main.c index da49191..ed0704e 100644 --- a/ui/main.c +++ b/ui/main.c @@ -638,7 +638,7 @@ void UI_DisplayMain(void) #endif #if defined(ENABLE_AM_FIX) && defined(ENABLE_AM_FIX_SHOW_DATA) - if (rx && gEeprom.VfoInfo[gEeprom.RX_VFO].Modulation != MODULATION_FM && gSetting_AM_fix) + if (rx && gEeprom.VfoInfo[gEeprom.RX_VFO].Modulation == MODULATION_AM && gSetting_AM_fix) { if (gScreenToDisplay != DISPLAY_MAIN || gDTMF_CallState != DTMF_CALL_STATE_NONE)