0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-20 15:08:37 +03:00

Fix DTMF and frequency entry bug

This commit is contained in:
OneOfEleven
2023-10-10 00:00:22 +01:00
parent 44f90a20b4
commit 79dae75556
7 changed files with 37 additions and 26 deletions

View File

@ -2313,6 +2313,9 @@ static void APP_ProcessKey(const key_code_t Key, const bool key_pressed, const b
}
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtype-limits"
if ((Key >= KEY_0 && Key <= KEY_9) || Key == KEY_F)
{
if (g_scan_state_dir != SCAN_OFF || g_css_scan_mode != CSS_SCAN_MODE_OFF)
@ -2323,6 +2326,8 @@ static void APP_ProcessKey(const key_code_t Key, const bool key_pressed, const b
}
}
#pragma GCC diagnostic pop
if (Key == KEY_PTT && g_ptt_was_pressed)
{
flag = key_held;
@ -2338,20 +2343,20 @@ static void APP_ProcessKey(const key_code_t Key, const bool key_pressed, const b
// to this causing key releases to be totally ignored :( .. 1of11
if (Key != KEY_PTT && g_ptt_was_released)
{
/* if (key_held)
if (key_held)
flag = true;
if (!key_pressed)
// if (!key_pressed)
if (key_pressed) // I now use key released for button press detections
{
flag = true;
*/
g_ptt_was_released = false;
/* }
}
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG)
UART_printf("proc key 1 %3u %u %u %u %u\r\n", Key, key_pressed, key_held, g_fkey_pressed, flag);
#endif
*/
}
if (g_fkey_pressed && (Key == KEY_PTT || Key == KEY_EXIT || Key == KEY_SIDE1 || Key == KEY_SIDE2))