From 29de1d36d4729a68ffcef8ed7b8f012763b87ae3 Mon Sep 17 00:00:00 2001 From: vk7js <58905135+vk7js@users.noreply.github.com> Date: Fri, 3 Jun 2022 22:27:12 +1000 Subject: [PATCH] Added a couple of comments and added whitespace between a couple of functions. No code changes. --- openrtx/src/ui/ui.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openrtx/src/ui/ui.c b/openrtx/src/ui/ui.c index 0ad8305c..d47aa08c 100644 --- a/openrtx/src/ui/ui.c +++ b/openrtx/src/ui/ui.c @@ -85,6 +85,7 @@ static uint16_t functionLatchTimer = 0; // 3000 ms. #define FUNCTION_LATCH_TIMEOUT 3000 + // When a key is pressed while Moni is latched, the latch timer is restarted. static void RestartFunctionLatchTimer() { @@ -101,16 +102,20 @@ static void ReleaseFunctionLatchIfNeeded() return; functionLatchTimer=0; + // Play beep for function latch release. } static void SetFunctionLatchTimer() { functionLatchTimer= getTick() + FUNCTION_LATCH_TIMEOUT; + // Play beep for set function latch. } + static bool FunctionKeyIsLatched() { return (functionLatchTimer > 0) && (getTick() < functionLatchTimer); } + /* UI main screen functions, their implementation is in "ui_main.c" */ extern void _ui_drawMainBackground(); extern void _ui_drawMainTop(); @@ -1110,7 +1115,6 @@ void ui_updateFSM(bool *sync_rtx) if (moniPressed && msg.long_press && !input_getPressedNumber(msg)) { SetFunctionLatchTimer(); // 3000 ms. - // Need to play beep to alert latch state enabled. } else {