From dd3de923e60f03266a1e7de6d369fe347face6a3 Mon Sep 17 00:00:00 2001 From: mark9064 <30447455+mark9064@users.noreply.github.com> Date: Sun, 27 Oct 2024 16:34:45 +0000 Subject: [PATCH] Correct tick overflow handling for timer reset --- src/displayapp/screens/Timer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index f6d5e73bdc..cc3a7ec460 100644 --- a/src/displayapp/screens/Timer.cpp +++ b/src/displayapp/screens/Timer.cpp @@ -105,7 +105,7 @@ void Timer::UpdateMask() { void Timer::Refresh() { if (timer.IsRunning()) { DisplayTime(); - } else if (buttonPressing && xTaskGetTickCount() > pressTime + pdMS_TO_TICKS(150)) { + } else if (buttonPressing && xTaskGetTickCount() - pressTime > pdMS_TO_TICKS(150)) { lv_label_set_text_static(txtPlayPause, "Reset"); maskPosition += 15; if (maskPosition > 240) {