Do some stuff
All checks were successful
Build Firmware / build (push) Successful in 2m19s

This commit is contained in:
2025-03-28 22:07:50 +01:00
parent 4fe99744e1
commit 85fb527020
23 changed files with 258 additions and 658 deletions

View File

@@ -121,6 +121,11 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax) {
*pMax = 9;
break;
case MENU_TOT:
*pMin = 0;
*pMax = 179;
break;
case MENU_STEP:
//*pMin = 0;
*pMax = STEP_N_ELEM - 1;
@@ -259,7 +264,7 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax) {
case MENU_SCR:
//*pMin = 0;
*pMax = 10;
*pMax = 65535;
break;
case MENU_AUTOLK:
@@ -271,11 +276,6 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax) {
*pMin = 0;
break;
case MENU_TOT:
//*pMin = 0;
*pMin = 5;
*pMax = 179;
break;
#ifdef ENABLE_VOX
case MENU_VOX:
@@ -385,35 +385,18 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax) {
//*pMin = 0;
*pMax = ARRAY_SIZE(gSubMenu_SET_PTT) - 1;
break;
case MENU_SET_TOT:
case MENU_SET_EOT:
//*pMin = 0;
*pMax = ARRAY_SIZE(gSubMenu_SET_TOT) - 1;
break;
#ifdef ENABLE_FEAT_F4HWN_INV
case MENU_SET_INV:
//*pMin = 0;
*pMax = ARRAY_SIZE(gSubMenu_OFF_ON) - 1;
break;
#endif
#ifdef ENABLE_FEAT_F4HWN_NARROWER
case MENU_SET_NFM:
//*pMin = 0;
*pMax = ARRAY_SIZE(gSubMenu_SET_NFM) - 1;
break;
#endif
#ifdef ENABLE_FEAT_F4HWN_VOL
case MENU_SET_VOL:
//*pMin = 0;
*pMax = 63;
break;
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
case MENU_SET_KEY:
//*pMin = 0;
*pMax = 4;
break;
#endif
#endif
default:
@@ -512,10 +495,7 @@ void MENU_AcceptSetting(void) {
case MENU_SCR:
gTxVfo->SCRAMBLING_TYPE = gSubMenuSelection;
if (gSubMenuSelection > 0)
BK4819_EnableScramble(gSubMenuSelection - 1);
else
BK4819_DisableScramble();
BK4819_SetScramble(gSubMenuSelection);
gRequestSaveChannel = 1;
return;
@@ -524,6 +504,10 @@ void MENU_AcceptSetting(void) {
gRequestSaveChannel = 1;
return;
case MENU_TOT:
gEeprom.TX_TIMEOUT_TIMER = gSubMenuSelection;
break;
case MENU_MEM_CH:
gTxVfo->CHANNEL_SAVE = gSubMenuSelection;
#if 0
@@ -600,10 +584,6 @@ void MENU_AcceptSetting(void) {
gEeprom.BEEP_CONTROL = gSubMenuSelection;
break;
case MENU_TOT:
gEeprom.TX_TIMEOUT_TIMER = gSubMenuSelection;
break;
#ifdef ENABLE_VOICE
case MENU_VOICE:
gEeprom.VOICE_PROMPT = gSubMenuSelection;
@@ -843,31 +823,13 @@ void MENU_AcceptSetting(void) {
gSetting_set_ptt = gSubMenuSelection;
gSetting_set_ptt_session = gSetting_set_ptt; // Special for action
break;
case MENU_SET_TOT:
gSetting_set_tot = gSubMenuSelection;
break;
case MENU_SET_EOT:
gSetting_set_eot = gSubMenuSelection;
break;
case MENU_SET_INV:
gSetting_set_inv = gSubMenuSelection;
break;
#ifdef ENABLE_FEAT_F4HWN_NARROWER
case MENU_SET_NFM:
gSetting_set_nfm = gSubMenuSelection;
RADIO_SetTxParameters();
RADIO_SetupRegisters(true);
break;
#endif
#ifdef ENABLE_FEAT_F4HWN_VOL
case MENU_SET_VOL:
gEeprom.VOLUME_GAIN = gSubMenuSelection;
break;
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
case MENU_SET_KEY:
gEeprom.SET_KEY = gSubMenuSelection;
break;
#endif
case MENU_SET_TMR:
gSetting_set_tmr = gSubMenuSelection;
@@ -978,6 +940,10 @@ void MENU_ShowCurrentSetting(void) {
gSubMenuSelection = gTxVfo->BUSY_CHANNEL_LOCK;
break;
case MENU_TOT:
gSubMenuSelection = gEeprom.TX_TIMEOUT_TIMER;
break;
case MENU_MEM_CH:
#if 0
gSubMenuSelection = gEeprom.MrChannel[0];
@@ -1032,11 +998,6 @@ void MENU_ShowCurrentSetting(void) {
case MENU_BEEP:
gSubMenuSelection = gEeprom.BEEP_CONTROL;
break;
case MENU_TOT:
gSubMenuSelection = gEeprom.TX_TIMEOUT_TIMER;
break;
#ifdef ENABLE_VOICE
case MENU_VOICE:
gSubMenuSelection = gEeprom.VOICE_PROMPT;
@@ -1242,29 +1203,13 @@ void MENU_ShowCurrentSetting(void) {
case MENU_SET_PTT:
gSubMenuSelection = gSetting_set_ptt_session;
break;
case MENU_SET_TOT:
gSubMenuSelection = gSetting_set_tot;
break;
case MENU_SET_EOT:
gSubMenuSelection = gSetting_set_eot;
break;
case MENU_SET_INV:
gSubMenuSelection = gSetting_set_inv;
break;
#ifdef ENABLE_FEAT_F4HWN_NARROWER
case MENU_SET_NFM:
gSubMenuSelection = gSetting_set_nfm;
break;
#endif
#ifdef ENABLE_FEAT_F4HWN_VOL
case MENU_SET_VOL:
gSubMenuSelection = gEeprom.VOLUME_GAIN;
break;
#endif
#ifdef ENABLE_FEAT_F4HWN_RESCUE_OPS
case MENU_SET_KEY:
gSubMenuSelection = gEeprom.SET_KEY;
break;
#endif
case MENU_SET_TMR:
gSubMenuSelection = gSetting_set_tmr;
@@ -1400,7 +1345,15 @@ static void MENU_Key_0_to_9(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
return;
}
Offset = (Max >= 100) ? 3 : (Max >= 10) ? 2 : 1;
Offset = (Max >= 1000000000) ? 10 :
(Max >= 100000000) ? 9 :
(Max >= 10000000) ? 8 :
(Max >= 1000000) ? 7 :
(Max >= 100000) ? 6 :
(Max >= 10000) ? 5 :
(Max >= 1000) ? 4 :
(Max >= 100) ? 3 :
(Max >= 10) ? 2 : 1;
/*
switch (gInputBoxIndex)