0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-18 22:29:50 +03:00

Added boot-up screen menu option, boot-beeps option

This commit is contained in:
OneOfEleven
2023-09-15 06:28:45 +01:00
parent 494faf5cee
commit 2fe8cd3757
17 changed files with 94 additions and 48 deletions

View File

@ -14,6 +14,8 @@
* limitations under the License.
*/
#include <string.h>
#ifdef ENABLE_AIRCOPY
#include "app/aircopy.h"
#endif
@ -31,16 +33,14 @@
BOOT_Mode_t BOOT_GetMode(void)
{
KEY_Code_t Keys[2];
unsigned int i;
KEY_Code_t Keys[2];
for (i = 0; i < 2; i++)
{
if (GPIO_CheckBit(&GPIOC->DATA, GPIOC_PIN_PTT))
return BOOT_MODE_NORMAL;
Keys[i] = KEYBOARD_Poll();
SYSTEM_DelayMs(20);
}
@ -66,20 +66,11 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
{
if (Mode == BOOT_MODE_F_LOCK)
{
gMenuListCount += 6; // enable the last 6 menu items
gMenuCursor = MENU_350TX;
gSubMenuSelection = gSetting_350TX;
GUI_SelectNextDisplay(DISPLAY_MENU);
gF_LOCK = true;
gMenuListCount = 57;
#ifndef ENABLE_VOICE
gMenuListCount--;
#endif
#ifndef ENABLE_ALARM
gMenuListCount--;
#endif
#ifndef ENABLE_NOAA
gMenuListCount--;
#endif
}
#ifdef ENABLE_AIRCOPY
else
@ -113,5 +104,7 @@ void BOOT_ProcessMode(BOOT_Mode_t Mode)
}
#endif
else
{
GUI_SelectNextDisplay(DISPLAY_MAIN);
}
}