Added a couple of comments and added whitespace between a couple of functions. No code changes.

md1702
vk7js 2022-06-03 22:27:12 +10:00 zatwierdzone przez Silvano Seva
rodzic bec9ec0218
commit 29de1d36d4
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -85,6 +85,7 @@
static uint16_t functionLatchTimer = 0; static uint16_t functionLatchTimer = 0;
// 3000 ms. // 3000 ms.
#define FUNCTION_LATCH_TIMEOUT 3000 #define FUNCTION_LATCH_TIMEOUT 3000
// When a key is pressed while Moni is latched, the latch timer is restarted. // When a key is pressed while Moni is latched, the latch timer is restarted.
static void RestartFunctionLatchTimer() static void RestartFunctionLatchTimer()
{ {
@ -101,16 +102,20 @@ static void ReleaseFunctionLatchIfNeeded()
return; return;
functionLatchTimer=0; functionLatchTimer=0;
// Play beep for function latch release.
} }
static void SetFunctionLatchTimer() static void SetFunctionLatchTimer()
{ {
functionLatchTimer= getTick() + FUNCTION_LATCH_TIMEOUT; functionLatchTimer= getTick() + FUNCTION_LATCH_TIMEOUT;
// Play beep for set function latch.
} }
static bool FunctionKeyIsLatched() static bool FunctionKeyIsLatched()
{ {
return (functionLatchTimer > 0) && (getTick() < functionLatchTimer); return (functionLatchTimer > 0) && (getTick() < functionLatchTimer);
} }
/* UI main screen functions, their implementation is in "ui_main.c" */ /* UI main screen functions, their implementation is in "ui_main.c" */
extern void _ui_drawMainBackground(); extern void _ui_drawMainBackground();
extern void _ui_drawMainTop(); extern void _ui_drawMainTop();
@ -1110,7 +1115,6 @@ void ui_updateFSM(bool *sync_rtx)
if (moniPressed && msg.long_press && !input_getPressedNumber(msg)) if (moniPressed && msg.long_press && !input_getPressedNumber(msg))
{ {
SetFunctionLatchTimer(); // 3000 ms. SetFunctionLatchTimer(); // 3000 ms.
// Need to play beep to alert latch state enabled.
} }
else else
{ {