mirror of
https://github.com/DualTachyon/uv-k5-firmware.git
synced 2024-11-21 05:30:49 +08:00
Fixed some missing beeps.
This commit is contained in:
parent
d99a121d98
commit
8a79fbefa8
14
app/app.c
14
app/app.c
@ -1538,14 +1538,14 @@ static void APP_ProcessKey_MAIN(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
if (gFmRadioMode && Key != KEY_PTT && Key != KEY_EXIT) {
|
||||
if (!bKeyHeld && bKeyPressed) {
|
||||
g_20000396 = 2;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (gDTMF_InputMode && !bKeyHeld && bKeyPressed) {
|
||||
char Character = DTMF_GetCharacter(Key);
|
||||
if (Character != 0xFF) {
|
||||
g_20000396 = 1;
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
DTMF_Append(Character);
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
g_20000394 = true;
|
||||
@ -1587,7 +1587,7 @@ static void APP_ProcessKey_MAIN(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
break;
|
||||
default:
|
||||
if (!bKeyHeld && bKeyPressed) {
|
||||
g_20000396 = 2;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1624,7 +1624,7 @@ void APP_ProcessKey_MENU(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
break;
|
||||
default:
|
||||
if (!bKeyHeld && bKeyPressed) {
|
||||
g_20000396 = 2;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1661,7 +1661,7 @@ static void APP_ProcessKey_FM(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
break;
|
||||
default:
|
||||
if (!bKeyHeld && bKeyPressed) {
|
||||
g_20000396 = 2;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1695,7 +1695,7 @@ static void APP_ProcessKey_SCANNER(KEY_Code_t Key, bool bKeyPressed, bool bKeyHe
|
||||
break;
|
||||
default:
|
||||
if (!bKeyHeld && bKeyPressed) {
|
||||
g_20000396 = 2;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1931,7 +1931,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
Skip:
|
||||
if (gBeepToPlay) {
|
||||
AUDIO_PlayBeep(gBeepToPlay);
|
||||
gBeepToPlay = 0;
|
||||
gBeepToPlay = BEEP_NONE;
|
||||
}
|
||||
|
||||
if (gFlagAcceptSetting) {
|
||||
|
@ -34,7 +34,7 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
if (gInputBoxIndex) {
|
||||
if (!bKeyHeld && bKeyPressed) {
|
||||
g_20000396 = 2;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -65,14 +65,14 @@ void GENERIC_Key_F(bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
} else {
|
||||
if (gScreenToDisplay != DISPLAY_FM) {
|
||||
g_20000396 = 1;
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
return;
|
||||
}
|
||||
if (gFM_Step == 0) {
|
||||
g_20000396 = 1;
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
return;
|
||||
}
|
||||
g_20000396 = 2;
|
||||
gBeepToPlay = BEEP_440HZ_500MS;
|
||||
g_20000394 = true;
|
||||
}
|
||||
}
|
||||
|
14
app/menu.c
14
app/menu.c
@ -826,7 +826,7 @@ void MENU_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
return;
|
||||
}
|
||||
|
||||
g_20000396 = 1;
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
INPUTBOX_Append(Key);
|
||||
gRequestDisplayScreen = DISPLAY_MENU;
|
||||
if (!gIsInSubMenu) {
|
||||
@ -916,13 +916,13 @@ void MENU_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
}
|
||||
}
|
||||
g_20000396 = 2;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
|
||||
void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
if (!bKeyHeld && bKeyPressed) {
|
||||
g_20000396 = 1;
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
if (g_20000381 == 0) {
|
||||
if (gIsInSubMenu) {
|
||||
if (gInputBoxIndex == 0 || gMenuCursor != MENU_OFFSET) {
|
||||
@ -951,7 +951,7 @@ void MENU_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
void MENU_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
if (!bKeyHeld && bKeyPressed) {
|
||||
g_20000396 = 1;
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
gRequestDisplayScreen = DISPLAY_MENU;
|
||||
if (!gIsInSubMenu) {
|
||||
if (gMenuCursor != MENU_SCR) {
|
||||
@ -1000,7 +1000,7 @@ void MENU_Key_MENU(bool bKeyPressed, bool bKeyHeld)
|
||||
void MENU_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
if (!bKeyHeld && bKeyPressed) {
|
||||
g_20000396 = 1;
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
RADIO_ConfigureTX();
|
||||
if (IS_NOT_NOAA_CHANNEL(gRxInfo->CHANNEL_SAVE) && !gRxInfo->IsAM) {
|
||||
if (gMenuCursor == MENU_R_CTCS || gMenuCursor == MENU_R_DCS) {
|
||||
@ -1018,7 +1018,7 @@ void MENU_Key_STAR(bool bKeyPressed, bool bKeyHeld)
|
||||
g_20000394 = true;
|
||||
return;
|
||||
}
|
||||
g_20000396 = 2;
|
||||
gBeepToPlay = BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1032,7 +1032,7 @@ void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||
if (!bKeyPressed) {
|
||||
return;
|
||||
}
|
||||
g_20000396 = 1;
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
gInputBoxIndex = 0;
|
||||
} else if (!bKeyPressed) {
|
||||
return;
|
||||
|
1
audio.h
1
audio.h
@ -21,6 +21,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
enum BEEP_Type_t {
|
||||
BEEP_NONE = 0U,
|
||||
BEEP_1KHZ_60MS_OPTIONAL = 1U,
|
||||
BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL = 2U,
|
||||
BEEP_440HZ_500MS = 3U,
|
||||
|
1
misc.c
1
misc.c
@ -82,7 +82,6 @@ bool g_20000394;
|
||||
uint8_t g_20000395;
|
||||
uint8_t gKeypadLocked;
|
||||
uint8_t g_20000395;
|
||||
uint8_t g_20000396;
|
||||
uint8_t g_20000398;
|
||||
uint8_t gVfoConfigureMode;
|
||||
uint8_t g_2000039B;
|
||||
|
Loading…
Reference in New Issue
Block a user