Correct tick overflow handling for timer reset

This commit is contained in:
mark9064 2024-10-27 16:34:45 +00:00
parent f1651c8000
commit dd3de923e6

View File

@ -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) {