0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 14:48:03 +03:00

const renames + display updates

This commit is contained in:
OneOfEleven
2023-09-16 17:16:36 +01:00
parent e5c7c81276
commit 7bd011b057
17 changed files with 110 additions and 410 deletions

View File

@ -98,7 +98,7 @@ static void APP_CheckForIncoming(void)
return;
}
gDualWatchCountdown = dual_watch_count_after_rx;
gDualWatchCountdown = dual_watch_count_after_rx_10ms;
gScheduleDualWatch = false;
}
else
@ -163,7 +163,7 @@ static void APP_HandleIncoming(void)
{
if (gRxReceptionMode == RX_MODE_DETECTED)
{
gDualWatchCountdown = dual_watch_count_after_1;
gDualWatchCountdown = dual_watch_count_after_1_10ms;
gScheduleDualWatch = false;
gRxReceptionMode = RX_MODE_LISTENING;
return;
@ -442,7 +442,7 @@ void APP_StartListening(FUNCTION_Type_t Function)
{
gRxVfoIsActive = true;
gDualWatchCountdown = dual_watch_count_after_2;
gDualWatchCountdown = dual_watch_count_after_2_10ms;
gScheduleDualWatch = false;
}
@ -607,9 +607,9 @@ static void DUALWATCH_Alternate(void)
RADIO_SetupRegisters(false);
#ifdef ENABLE_NOAA
gDualWatchCountdown = gIsNoaaMode ? dual_watch_count_noaa : dual_watch_count_toggle;
gDualWatchCountdown = gIsNoaaMode ? dual_watch_count_noaa_10ms : dual_watch_count_toggle_10ms;
#else
gDualWatchCountdown = dual_watch_count_toggle;
gDualWatchCountdown = dual_watch_count_toggle_10ms;
#endif
}
@ -687,9 +687,9 @@ void APP_CheckRadioInterrupts(void)
gBatterySaveCountdownExpired = false;
}
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF && (gScheduleDualWatch || gDualWatchCountdown < dual_watch_count_after_vox))
if (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF && (gScheduleDualWatch || gDualWatchCountdown < dual_watch_count_after_vox_10ms))
{
gDualWatchCountdown = dual_watch_count_after_vox;
gDualWatchCountdown = dual_watch_count_after_vox_10ms;
gScheduleDualWatch = false;
}
}
@ -975,12 +975,12 @@ void APP_Update(void)
gCssScanMode != CSS_SCAN_MODE_OFF ||
gScreenToDisplay != DISPLAY_MAIN ||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
gBatterySaveCountdown = battery_save_count;
gBatterySaveCountdown = battery_save_count_10ms;
else
if ((IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[0]) && IS_NOT_NOAA_CHANNEL(gEeprom.ScreenChannel[1])) || !gIsNoaaMode)
FUNCTION_Select(FUNCTION_POWER_SAVE);
else
gBatterySaveCountdown = battery_save_count;
gBatterySaveCountdown = battery_save_count_10ms;
#else
if (
#ifdef ENABLE_FMRADIO
@ -993,7 +993,7 @@ void APP_Update(void)
gCssScanMode != CSS_SCAN_MODE_OFF ||
gScreenToDisplay != DISPLAY_MAIN ||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
gBatterySaveCountdown = battery_save_count;
gBatterySaveCountdown = battery_save_count_10ms;
else
FUNCTION_Select(FUNCTION_POWER_SAVE);
#endif
@ -1135,7 +1135,7 @@ void APP_CheckKeys(void)
return;
}
if (++gDebounceCounter == key_debounce)
if (++gDebounceCounter == key_debounce_10ms)
{ // debounced new key pressed
if (Key == KEY_INVALID)
@ -1158,7 +1158,7 @@ void APP_CheckKeys(void)
// key is being held pressed
if (gDebounceCounter == key_repeat_delay)
if (gDebounceCounter == key_repeat_delay_10ms)
{ // initial delay after pressed
if (Key == KEY_STAR ||
Key == KEY_F ||
@ -1178,19 +1178,19 @@ void APP_CheckKeys(void)
return;
}
if (gDebounceCounter > key_repeat_delay)
if (gDebounceCounter > key_repeat_delay_10ms)
{ // key repeat
if (Key == KEY_UP || Key == KEY_DOWN)
{
gKeyBeingHeld = true;
if ((gDebounceCounter % key_repeat) == 0)
if ((gDebounceCounter % key_repeat_10ms) == 0)
APP_ProcessKey(Key, true, true);
}
if (gDebounceCounter < 0xFFFF)
return;
gDebounceCounter = key_repeat_delay;
gDebounceCounter = key_repeat_delay_10ms;
return;
}
}
@ -1374,7 +1374,7 @@ void APP_TimeSlice10ms(void)
GUI_SelectNextDisplay(DISPLAY_SCANNER);
}
gScanDelay = g_scan_delay;
gScanDelay = scan_delay_10ms;
break;
case SCAN_CSS_STATE_SCANNING:
@ -1420,7 +1420,7 @@ void APP_TimeSlice10ms(void)
if (gScanCssState < SCAN_CSS_STATE_FOUND)
{
BK4819_SetScanFrequency(gScanFrequency);
gScanDelay = g_scan_delay;
gScanDelay = scan_delay_10ms;
break;
}
@ -1753,7 +1753,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
if (gCurrentFunction == FUNCTION_POWER_SAVE)
FUNCTION_Select(FUNCTION_FOREGROUND);
gBatterySaveCountdown = battery_save_count;
gBatterySaveCountdown = battery_save_count_10ms;
if (gEeprom.AUTO_KEYPAD_LOCK)
gKeyLockCountdown = 30; // 15 seconds
@ -1792,7 +1792,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
else
{
if (Key != KEY_PTT)
gVoltageMenuCountdown = g_menu_timeout;
gVoltageMenuCountdown = menu_timeout_10ms;
BACKLIGHT_TurnOn();

View File

@ -266,7 +266,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
uint8_t Vfo = gEeprom.TX_CHANNEL;
gKeyInputCountdown = key_input_timeout;
gKeyInputCountdown = key_input_timeout_500ms;
INPUTBOX_Append(Key);
gRequestDisplayScreen = DISPLAY_MAIN;
@ -413,7 +413,7 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
return;
gInputBox[--gInputBoxIndex] = 10;
gKeyInputCountdown = key_input_timeout;
gKeyInputCountdown = key_input_timeout_500ms;
#ifdef ENABLE_VOICE
if (gInputBoxIndex == 0)
@ -507,7 +507,7 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld)
if (gScanState == SCAN_OFF)
#endif
{
gKeyInputCountdown = key_input_timeout;
gKeyInputCountdown = key_input_timeout_500ms;
gDTMF_InputMode = true;
memcpy(gDTMF_InputBox, gDTMF_String, 15);
gDTMF_InputIndex = 0;
@ -657,7 +657,7 @@ void MAIN_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
{ // add key to DTMF string
DTMF_Append(Character);
gKeyInputCountdown = key_input_timeout;
gKeyInputCountdown = key_input_timeout_500ms;
gRequestDisplayScreen = DISPLAY_MAIN;
gPttWasReleased = true;
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;

View File

@ -1444,5 +1444,5 @@ void MENU_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
}
if (gScreenToDisplay == DISPLAY_MENU && gMenuCursor == MENU_VOL)
gVoltageMenuCountdown = g_menu_timeout;
gVoltageMenuCountdown = menu_timeout_10ms;
}

View File

@ -391,7 +391,7 @@ void SCANNER_Start(void)
BK4819_EnableFrequencyScan();
}
gScanDelay = g_scan_delay;
gScanDelay = scan_delay_10ms;
gScanCssResultCode = 0xFF;
gScanCssResultType = 0xFF;
gScanHitCount = 0;