mirror of
https://github.com/kamilsss655/uv-k5-firmware-custom
synced 2024-11-21 17:57:59 +00:00
Added RxAGC MENU item.
This commit is contained in:
parent
d5828f3651
commit
2c268a50b5
15
app/menu.c
15
app/menu.c
@ -250,6 +250,11 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
|
||||
*pMax = ARRAY_SIZE(gModulationStr) - 1;
|
||||
break;
|
||||
|
||||
case MENU_RX_AGC:
|
||||
*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_RX_AGC) - 1;
|
||||
break;
|
||||
|
||||
case MENU_SCR:
|
||||
*pMin = 0;
|
||||
*pMax = ARRAY_SIZE(gSubMenu_SCRAMBLER) - 1;
|
||||
@ -707,6 +712,12 @@ void MENU_AcceptSetting(void)
|
||||
gRequestSaveChannel = 1;
|
||||
return;
|
||||
|
||||
case MENU_RX_AGC:
|
||||
gEeprom.RX_AGC = gSubMenuSelection;
|
||||
gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
|
||||
gFlagResetVfos = true;
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
case MENU_NOAA_S:
|
||||
gEeprom.NOAA_AUTO_SCAN = gSubMenuSelection;
|
||||
@ -1059,6 +1070,10 @@ void MENU_ShowCurrentSetting(void)
|
||||
gSubMenuSelection = gTxVfo->Modulation;
|
||||
break;
|
||||
|
||||
case MENU_RX_AGC:
|
||||
gSubMenuSelection = gEeprom.RX_AGC;
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
case MENU_NOAA_S:
|
||||
gSubMenuSelection = gEeprom.NOAA_AUTO_SCAN;
|
||||
|
5
board.c
5
board.c
@ -605,10 +605,11 @@ void BOARD_EEPROM_Init(void)
|
||||
memmove(&gEeprom.POWER_ON_PASSWORD, Data, 4);
|
||||
|
||||
// 0EA0..0EA7
|
||||
EEPROM_ReadBuffer(0x0EA0, Data, 8);
|
||||
#ifdef ENABLE_VOX
|
||||
EEPROM_ReadBuffer(0x0EA0, Data, 8);
|
||||
gEeprom.VOX_DELAY = (Data[0] < 11) ? Data[0] : 4;
|
||||
#endif
|
||||
gEeprom.RX_AGC = (Data[1] < RX_AGC_LEN) ? Data[1] : RX_AGC_SLOW;
|
||||
|
||||
// 0EA8..0EAF
|
||||
EEPROM_ReadBuffer(0x0EA8, Data, 8);
|
||||
@ -619,7 +620,7 @@ void BOARD_EEPROM_Init(void)
|
||||
gEeprom.REPEATER_TAIL_TONE_ELIMINATION = (Data[2] < 11) ? Data[2] : 0;
|
||||
gEeprom.TX_VFO = (Data[3] < 2) ? Data[3] : 0;
|
||||
gEeprom.BATTERY_TYPE = (Data[4] < BATTERY_TYPE_UNKNOWN) ? Data[4] : BATTERY_TYPE_1600_MAH;
|
||||
|
||||
|
||||
// 0ED0..0ED7
|
||||
EEPROM_ReadBuffer(0x0ED0, Data, 8);
|
||||
gEeprom.DTMF_SIDE_TONE = (Data[0] < 2) ? Data[0] : true;
|
||||
|
Binary file not shown.
10
settings.c
10
settings.c
@ -127,11 +127,13 @@ void SETTINGS_SaveSettings(void)
|
||||
EEPROM_WriteBuffer(0x0E98, State, true);
|
||||
|
||||
memset(State, 0xFF, sizeof(State));
|
||||
#ifdef ENABLE_VOX
|
||||
State[0] = gEeprom.VOX_DELAY;
|
||||
#ifdef ENABLE_VOX
|
||||
State[0] = gEeprom.VOX_DELAY;
|
||||
#endif
|
||||
State[1] = gEeprom.RX_AGC;
|
||||
EEPROM_WriteBuffer(0x0EA0, State, true);
|
||||
#endif
|
||||
|
||||
|
||||
memset(State, 0xFF, sizeof(State));
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
State[0] = gEeprom.ALARM_MODE;
|
||||
#else
|
||||
|
@ -74,6 +74,13 @@ enum {
|
||||
OUTPUT_POWER_HIGH
|
||||
};
|
||||
|
||||
enum {
|
||||
RX_AGC_OFF = 0,
|
||||
RX_AGC_SLOW,
|
||||
RX_AGC_FAST,
|
||||
RX_AGC_LEN
|
||||
};
|
||||
|
||||
enum {
|
||||
ACTION_OPT_NONE = 0,
|
||||
ACTION_OPT_FLASHLIGHT,
|
||||
@ -252,6 +259,7 @@ typedef struct {
|
||||
uint8_t BACKLIGHT_MAX;
|
||||
BATTERY_Type_t BATTERY_TYPE;
|
||||
uint32_t RX_OFFSET;
|
||||
uint8_t RX_AGC;
|
||||
} EEPROM_Config_t;
|
||||
|
||||
extern EEPROM_Config_t gEeprom;
|
||||
|
12
ui/menu.c
12
ui/menu.c
@ -53,6 +53,7 @@ const t_menu_item MenuList[] =
|
||||
{"BusyCL", VOICE_ID_BUSY_LOCKOUT, MENU_BCL }, // was "BCL"
|
||||
{"Compnd", VOICE_ID_INVALID, MENU_COMPAND },
|
||||
{"Demodu", VOICE_ID_INVALID, MENU_AM }, // was "AM"
|
||||
{"RxAGC", VOICE_ID_INVALID, MENU_RX_AGC }, // RX Auto Gain Control
|
||||
{"ScAdd1", VOICE_ID_INVALID, MENU_S_ADD1 },
|
||||
{"ScAdd2", VOICE_ID_INVALID, MENU_S_ADD2 },
|
||||
{"ChSave", VOICE_ID_MEMORY_CHANNEL, MENU_MEM_CH }, // was "MEM-CH"
|
||||
@ -168,6 +169,13 @@ const char gSubMenu_SAVE[][4] =
|
||||
"80%"
|
||||
};
|
||||
|
||||
const char gSubMenu_RX_AGC[][6] =
|
||||
{
|
||||
"OFF",
|
||||
"SLOW",
|
||||
"FAST"
|
||||
};
|
||||
|
||||
const char gSubMenu_TOT[][7] =
|
||||
{
|
||||
"30 sec",
|
||||
@ -595,6 +603,10 @@ void UI_DisplayMenu(void)
|
||||
case MENU_AM:
|
||||
strcpy(String, gModulationStr[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_RX_AGC:
|
||||
strcpy(String, gSubMenu_RX_AGC[gSubMenuSelection]);
|
||||
break;
|
||||
|
||||
case MENU_AUTOLK:
|
||||
strcpy(String, (gSubMenuSelection == 0) ? "OFF" : "AUTO");
|
||||
|
@ -116,7 +116,8 @@ enum
|
||||
MENU_F2SHRT,
|
||||
MENU_F2LONG,
|
||||
MENU_MLONG,
|
||||
MENU_BATTYP
|
||||
MENU_BATTYP,
|
||||
MENU_RX_AGC
|
||||
};
|
||||
|
||||
extern const uint8_t FIRST_HIDDEN_MENU_ITEM;
|
||||
@ -151,6 +152,7 @@ extern const char gSubMenu_RX_TX[4][6];
|
||||
extern const char gSubMenu_BAT_TXT[3][8];
|
||||
extern const char gSubMenu_BATTYP[2][9];
|
||||
extern const char gSubMenu_SCRAMBLER[11][7];
|
||||
extern const char gSubMenu_RX_AGC[3][6];
|
||||
|
||||
typedef struct {char* name; uint8_t id;} t_sidefunction;
|
||||
extern const uint8_t gSubMenu_SIDEFUNCTIONS_size;
|
||||
|
Loading…
Reference in New Issue
Block a user