Don't use AM fix for USB/BYP/RAW

This commit is contained in:
Krzysiek Egzmont 2023-11-03 12:18:31 +01:00
parent 8c9bdaacbc
commit 21535c9ca0
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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)