From 5421e52bf4c10636327904670ff9367f946012c3 Mon Sep 17 00:00:00 2001 From: Nicu Hodos Date: Sun, 28 Sep 2025 12:21:45 +0200 Subject: [PATCH] when turning timer on, resume remaining time instead of resetting it to initial value --- include/timer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/timer.h b/include/timer.h index 864883d..061582f 100644 --- a/include/timer.h +++ b/include/timer.h @@ -6,7 +6,7 @@ typedef void (*remaining_callback_t)(int8); struct : public CallbackAware { void operator=(int8 value) { - initial = remaining = value; + remaining = value; } operator int8() { @@ -14,7 +14,7 @@ struct : public CallbackAware { } void start() { - remaining = initial + 1; + initial = remaining++; } void decrease() {