mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-20 15:08:37 +03:00
Various DTMF bug fixes and renames
This commit is contained in:
28
app/main.c
28
app/main.c
@ -452,9 +452,17 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
if (!bKeyHeld && bKeyPressed)
|
||||
{
|
||||
{ // exit key pressed
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
if (gDTMF_CallState != DTMF_CALL_STATE_NONE && gCurrentFunction != FUNCTION_TRANSMIT)
|
||||
{ // clear CALL mode being displayed
|
||||
gDTMF_CallState = DTMF_CALL_STATE_NONE;
|
||||
gUpdateDisplay = true;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FMRADIO
|
||||
if (!gFmRadioMode)
|
||||
#endif
|
||||
@ -493,7 +501,8 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
|
||||
if (bKeyHeld && bKeyPressed)
|
||||
{
|
||||
{ // exit key held down
|
||||
|
||||
if (gInputBoxIndex > 0)
|
||||
{ // cancel key input mode (channel/frequency entry)
|
||||
gDTMF_InputMode = false;
|
||||
@ -509,7 +518,7 @@ static void MAIN_Key_EXIT(bool bKeyPressed, bool bKeyHeld)
|
||||
static void MAIN_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
{
|
||||
if (bKeyHeld)
|
||||
{ // key held down (long press)
|
||||
{ // menu key held down (long press)
|
||||
|
||||
if (bKeyPressed)
|
||||
{
|
||||
@ -560,6 +569,7 @@ static void MAIN_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
|
||||
// TODO: finish this
|
||||
|
||||
//gEeprom.RX_CHANNEL = () & 1; // swap to the VFO
|
||||
|
||||
@ -577,13 +587,13 @@ static void MAIN_Key_MENU(const bool bKeyPressed, const bool bKeyHeld)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bKeyPressed)
|
||||
{
|
||||
bool bFlag;
|
||||
if (!bKeyPressed && !gDTMF_InputMode)
|
||||
{ // menu key released
|
||||
const bool bFlag = (gInputBoxIndex == 0);
|
||||
gInputBoxIndex = 0;
|
||||
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
bFlag = (gInputBoxIndex == 0);
|
||||
gInputBoxIndex = 0;
|
||||
gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL;
|
||||
|
||||
if (bFlag)
|
||||
{
|
||||
gFlagRefreshSetting = true;
|
||||
|
Reference in New Issue
Block a user