From d4194d9942bc9241adbe0baf25d6299eaa55fe68 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Sat, 22 Jun 2024 20:24:44 +0200 Subject: [PATCH] Fix time extension below 10 minutes --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 0cc194e..29268d6 100644 --- a/src/main.c +++ b/src/main.c @@ -245,7 +245,7 @@ static void update_countdown_fsm(uint32_t time_ms) && (time_in_state > 3000) && ((time_ms - buttons_get_last_change_time(BTN_ON)) > 500) && ((time_ms - buttons_get_last_change_time(BTN_ON)) % 500 == 0))) { - if(m_countdown_off_time < 10 * ONE_MINUTE) { + if(countdown_time_remaining < 10 * ONE_MINUTE) { m_countdown_off_time += 10 * ONE_MINUTE; } else { m_countdown_off_time += countdown_time_remaining; // double remaining time