diff options
| author | mark9064 <30447455+mark9064@users.noreply.github.com> | 2024-10-27 16:34:45 +0000 |
|---|---|---|
| committer | mark9064 <30447455+mark9064@users.noreply.github.com> | 2025-11-06 21:43:48 +0000 |
| commit | 3a1f4fe2116c0d334bb2dd934bf2c342d26e6bce (patch) | |
| tree | d0ecc36090e064d9999cd959648957f8e315b85c | |
| parent | fcc8073fabe9ef095aa3597eed678e7eeb04086a (diff) | |
Correct tick overflow handling for timer reset
| -rw-r--r-- | src/displayapp/screens/Timer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |
