0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-05-18 16:01:18 +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

@ -21,7 +21,7 @@ ENABLE_BOOT_BEEPS := 0
ENABLE_COMPANDER := 1
ENABLE_SHOW_CHARGE_LEVEL := 0
ENABLE_REVERSE_BAT_SYMBOL := 1
ENABLE_AM_AGC_GAIN := 1
ENABLE_AM_FIX := 1
ENABLE_AUDIO_BAR := 0
#ENABLE_SINGLE_VFO_CHAN := 1
#ENABLE_BAND_SCOPE := 1
@ -197,8 +197,8 @@ endif
ifeq ($(ENABLE_REVERSE_BAT_SYMBOL),1)
CFLAGS += -DENABLE_REVERSE_BAT_SYMBOL
endif
ifeq ($(ENABLE_AM_AGC_GAIN),1)
CFLAGS += -DENABLE_AM_AGC_GAIN
ifeq ($(ENABLE_AM_FIX),1)
CFLAGS += -DENABLE_AM_FIX
endif
ifeq ($(ENABLE_AUDIO_BAR),1)
CFLAGS += -DENABLE_AUDIO_BAR

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;

BIN
firmware

Binary file not shown.

Binary file not shown.

Binary file not shown.

2
misc.c
View File

@ -69,7 +69,7 @@ bool gSetting_TX_EN;
uint8_t gSetting_F_LOCK;
bool gSetting_ScrambleEnable;
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
bool gSetting_AM_fix;
#endif
#ifdef ENABLE_AUDIO_BAR

2
misc.h
View File

@ -130,7 +130,7 @@ extern bool gSetting_TX_EN;
extern uint8_t gSetting_F_LOCK;
extern bool gSetting_ScrambleEnable;
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
extern bool gSetting_AM_fix;
#endif
#ifdef ENABLE_AUDIO_BAR

View File

@ -171,7 +171,7 @@ void SETTINGS_SaveSettings(void)
#ifdef ENABLE_AUDIO_BAR
if (!gSetting_mic_bar) State[7] &= ~(1u << 4);
#endif
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
if (!gSetting_AM_fix) State[7] &= ~(1u << 5);
#endif
EEPROM_WriteBuffer(0x0F40, State);

View File

@ -101,7 +101,7 @@ const t_menu_item MenuList[] =
{"BATVOL", 0, VOICE_ID_INVALID, MENU_VOL }, // was "VOL"
{"BATTXT", 0, VOICE_ID_INVALID, MENU_BAT_TXT },
{"MODE", 0, VOICE_ID_INVALID, MENU_AM }, // was "AM"
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
{"AM-FIX", 0, VOICE_ID_INVALID, MENU_AM_FIX },
#endif
#ifdef ENABLE_NOAA
@ -419,7 +419,7 @@ void UI_DisplayMenu(void)
strcpy(String, (gSubMenuSelection == 0) ? "FM" : "AM");
break;
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
case MENU_AM_FIX:
strcpy(String, (gSubMenuSelection == 0) ? "OFF" : "FIXED");
break;

View File

@ -93,7 +93,7 @@ enum
MENU_VOL,
MENU_BAT_TXT,
MENU_AM,
#ifdef ENABLE_AM_AGC_GAIN
#ifdef ENABLE_AM_FIX
MENU_AM_FIX,
#endif
#ifdef ENABLE_NOAA