Compare commits

...

1 commit

Author SHA1 Message Date
Thomas Kolb d4194d9942 Fix time extension below 10 minutes 2024-06-22 20:24:44 +02:00

View file

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