Prevent to rapid time increment after turn-on
This commit is contained in:
parent
deca973854
commit
455118882b
|
@ -216,6 +216,7 @@ static void update_countdown_fsm(uint32_t time_ms)
|
|||
// extend time when on button is pressed again
|
||||
if(buttons_get_events(BTN_ON) & BTN_EVENT_PRESSED
|
||||
|| (buttons_is_pressed(BTN_ON)
|
||||
&& (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) {
|
||||
|
|
Loading…
Reference in a new issue