From 75793443f085927dac28d05b09bc7dc6fbc64933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 17 Sep 2017 02:40:45 +0200 Subject: [PATCH] some timing tuning --- game.c | 6 +++--- main.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/game.c b/game.c index f848ae8..30d555a 100644 --- a/game.c +++ b/game.c @@ -181,7 +181,7 @@ static void replaySequenceCb(void *onOff) show_screen(); enterGameState(STATE_USER_INPUT); - schedule_task(fadeInColorsCb, (void *) 255, 400, false); + schedule_task(fadeInColorsCb, (void *) 255, 350, false); } } } @@ -347,13 +347,13 @@ void game_main(void) while(1); // wait for shutdown } } else { - if (idle_cnt > 200) { + if (idle_cnt > 300) { // reset state usart_puts("game reset, user walked away\r\n"); enterGameState(STATE_NEW_GAME); show_screen(); display_show(0, 0); - idle_cnt = 0; + idle_cnt = 49; // fade in rainbow quickly } } } else { diff --git a/main.c b/main.c index 1b8159a..df9ca5b 100644 --- a/main.c +++ b/main.c @@ -111,7 +111,7 @@ void task_check_shutdown_btn(void *unused) { _delay_ms(100); // Wait for user to release while (pin_read(PIN_PWR_KEY)); - _delay_ms(500); + _delay_ms(100); // shut down pin_down(PIN_PWR_HOLD);