0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-08-03 09:36:32 +03:00
This commit is contained in:
OneOfEleven
2023-09-21 23:25:46 +01:00
parent fb85c14037
commit 0206bde628
11 changed files with 32 additions and 17 deletions

View File

@@ -1314,7 +1314,7 @@ void APP_CheckKeys(void)
}
}
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
void adjustAMFrontEnd10ms(void)
{
if (!gRxVfo->IsAM)
@@ -1411,18 +1411,33 @@ void APP_CheckKeys(void)
else
if (new_lna < 7)
new_lna++;
else
if (new_lna_short < 3)
new_lna_short++;
}
else
if (avg_rssi > (desired_rssi + 4))
{ // decrease gain
if (new_pga > 6)
new_pga--;
else
if (new_mixer > 3)
new_mixer--;
else
if (new_lna > 2)
new_lna--;
else
if (new_lna_short > 0)
new_lna_short++;
else
if (new_pga > 0)
new_pga--;
else
if (new_mixer > 0)
new_mixer--;
else
if (new_lna > 0)
new_lna--;
else
if (new_mixer > 0)
new_mixer--;
}
}
@@ -1448,7 +1463,7 @@ void APP_TimeSlice10ms(void)
AUDIO_PlayBeep(BEEP_880HZ_40MS_OPTIONAL);
#endif
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
if (gSetting_AM_fix)
adjustAMFrontEnd10ms();
#endif

View File

@@ -186,7 +186,7 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
case MENU_D_DCD:
case MENU_D_LIVE_DEC:
case MENU_AM:
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
case MENU_AM_FIX:
#endif
#ifdef ENABLE_NOAA
@@ -609,7 +609,7 @@ void MENU_AcceptSetting(void)
gRequestSaveChannel = 2;
return;
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
case MENU_AM_FIX:
gSetting_AM_fix = gSubMenuSelection;
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
@@ -987,7 +987,7 @@ void MENU_ShowCurrentSetting(void)
gSubMenuSelection = gTxVfo->AM_CHANNEL_MODE;
break;
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
case MENU_AM_FIX:
gSubMenuSelection = gSetting_AM_fix;
break;