0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-20 15:08:37 +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