From 3a1f4fe2116c0d334bb2dd934bf2c342d26e6bce 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: Correct tick overflow handling for timer reset --- src/displayapp/screens/Timer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/displayapp/screens/Timer.cpp b/src/displayapp/screens/Timer.cpp index 31cde733..d5f2a2b7 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) { -- cgit v1.2.3-70-g09d2