Skip to content

Commit 3a1f4fe

Browse files
committed
Correct tick overflow handling for timer reset
1 parent fcc8073 commit 3a1f4fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/displayapp/screens/Timer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void Timer::UpdateMask() {
105105
void Timer::Refresh() {
106106
if (timer.IsRunning()) {
107107
DisplayTime();
108-
} else if (buttonPressing && xTaskGetTickCount() > pressTime + pdMS_TO_TICKS(150)) {
108+
} else if (buttonPressing && xTaskGetTickCount() - pressTime > pdMS_TO_TICKS(150)) {
109109
lv_label_set_text_static(txtPlayPause, "Reset");
110110
maskPosition += 15;
111111
if (maskPosition > 240) {

0 commit comments

Comments
 (0)