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

Menu timeout to 30 seconds

This commit is contained in:
OneOfEleven
2023-09-11 11:56:59 +01:00
parent cff04127d3
commit 6a1b7d8673
7 changed files with 23 additions and 19 deletions

View File

@ -1280,18 +1280,21 @@ void APP_TimeSlice500ms(void)
{
// Skipped authentic device check
if (gBacklightCountdown > 0)
if (--gBacklightCountdown == 0)
if (gEeprom.BACKLIGHT < 5)
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn backlight off
if (gKeypadLocked)
if (gCurrentFunction != FUNCTION_TRANSMIT)
{
if (gBacklightCountdown > 0)
if (--gBacklightCountdown == 0)
if (gEeprom.BACKLIGHT < 5)
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn backlight off
}
if (gKeypadLocked > 0)
if (--gKeypadLocked == 0)
gUpdateDisplay = true;
// Skipped authentic device check
if (gFmRadioCountdown)
if (gFmRadioCountdown > 0)
{
gFmRadioCountdown--;
return;
@ -1326,7 +1329,7 @@ void APP_TimeSlice500ms(void)
gCurrentRSSI = BK4819_GetRSSI();
UI_UpdateRSSI(gCurrentRSSI);
}
else
// else
{
if ((gFM_ScanState == FM_SCAN_OFF || gAskToSave) && gScanState == SCAN_OFF && gCssScanMode == CSS_SCAN_MODE_OFF)
{
@ -1344,7 +1347,7 @@ void APP_TimeSlice500ms(void)
gUpdateStatus = true;
}
if (gVoltageMenuCountdown)
if (gVoltageMenuCountdown > 0)
{
if (--gVoltageMenuCountdown == 0)
{

View File

@ -1322,5 +1322,5 @@ void MENU_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
}
if (gScreenToDisplay == DISPLAY_MENU && gMenuCursor == MENU_VOL)
gVoltageMenuCountdown = 32;
gVoltageMenuCountdown = 2 * 30; // 30 sec
}