Merge OneOfEleven at commit 'b7241f77efb42bca8443b1b129678c64bdb6dbab'

This commit is contained in:
Krzysiek Egzmont
2023-10-01 13:42:05 +02:00
20 changed files with 395 additions and 250 deletions

View File

@@ -458,9 +458,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
@@ -499,7 +507,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;
@@ -515,7 +524,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)
{
@@ -566,6 +575,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
@@ -583,13 +593,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;