0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 06:39:49 +03:00

Removed duplicate AM flag (IsAM)

This commit is contained in:
OneOfEleven
2023-09-28 23:32:08 +01:00
parent d2729c2007
commit 8ce02a37a9
10 changed files with 51 additions and 56 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].IsAM && gSetting_AM_fix)
if (gEeprom.VfoInfo[vfo].AM_mode && gSetting_AM_fix)
rssi -= rssi_gain_diff[vfo];
#endif
@ -433,7 +433,7 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix)
#endif
#ifdef ENABLE_AM_FIX
if (gEeprom.VfoInfo[gEeprom.RX_CHANNEL].IsAM && reset_am_fix)
if (gEeprom.VfoInfo[gEeprom.RX_CHANNEL].AM_mode && reset_am_fix)
AM_fix_reset(gEeprom.RX_CHANNEL); // TODO: only reset it when moving channel/frequency
#endif
@ -505,7 +505,7 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix)
uint8_t mixer = orig_mixer;
uint8_t pga = orig_pga;
if (gRxVfo->IsAM)
if (gRxVfo->AM_mode)
{ // AM
/*
#ifndef ENABLE_AM_FIX
@ -553,7 +553,7 @@ void APP_StartListening(FUNCTION_Type_t Function, const bool reset_am_fix)
#ifdef ENABLE_VOICE
if (gVoiceWriteIndex == 0)
#endif
BK4819_SetAF(gRxVfo->IsAM ? BK4819_AF_AM : BK4819_AF_OPEN);
BK4819_SetAF(gRxVfo->AM_mode ? BK4819_AF_AM : BK4819_AF_OPEN);
FUNCTION_Select(Function);
@ -1351,7 +1351,7 @@ void APP_TimeSlice10ms(void)
#endif
#ifdef ENABLE_AM_FIX
if (gEeprom.VfoInfo[gEeprom.RX_CHANNEL].IsAM && gSetting_AM_fix)
if (gEeprom.VfoInfo[gEeprom.RX_CHANNEL].AM_mode && gSetting_AM_fix)
AM_fix_10ms(gEeprom.RX_CHANNEL);
#endif

View File

@ -625,8 +625,8 @@ void MENU_AcceptSetting(void)
break;
case MENU_AM:
gTxVfo->AM_CHANNEL_MODE = gSubMenuSelection;
gRequestSaveChannel = 1;
gTxVfo->AM_mode = gSubMenuSelection;
gRequestSaveChannel = 1;
return;
#ifdef ENABLE_AM_FIX
@ -1013,7 +1013,7 @@ void MENU_ShowCurrentSetting(void)
break;
case MENU_AM:
gSubMenuSelection = gTxVfo->AM_CHANNEL_MODE;
gSubMenuSelection = gTxVfo->AM_mode;
break;
#ifdef ENABLE_AM_FIX
@ -1459,9 +1459,9 @@ static void MENU_Key_STAR(const bool bKeyPressed, const bool bKeyHeld)
RADIO_SelectVfos();
#ifdef ENABLE_NOAA
if (IS_NOT_NOAA_CHANNEL(gRxVfo->CHANNEL_SAVE) && !gRxVfo->IsAM)
if (IS_NOT_NOAA_CHANNEL(gRxVfo->CHANNEL_SAVE) && gRxVfo->AM_mode == 0)
#else
if (!gRxVfo->IsAM)
if (gRxVfo->AM_mode == 0)
#endif
{
if (gMenuCursor == MENU_R_CTCS || gMenuCursor == MENU_R_DCS)