some timing tuning

master
Ondřej Hruška 7 years ago
parent 1c13fdd41e
commit 75793443f0
  1. 6
      game.c
  2. 2
      main.c

@ -181,7 +181,7 @@ static void replaySequenceCb(void *onOff)
show_screen(); show_screen();
enterGameState(STATE_USER_INPUT); 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 while(1); // wait for shutdown
} }
} else { } else {
if (idle_cnt > 200) { if (idle_cnt > 300) {
// reset state // reset state
usart_puts("game reset, user walked away\r\n"); usart_puts("game reset, user walked away\r\n");
enterGameState(STATE_NEW_GAME); enterGameState(STATE_NEW_GAME);
show_screen(); show_screen();
display_show(0, 0); display_show(0, 0);
idle_cnt = 0; idle_cnt = 49; // fade in rainbow quickly
} }
} }
} else { } else {

@ -111,7 +111,7 @@ void task_check_shutdown_btn(void *unused) {
_delay_ms(100); _delay_ms(100);
// Wait for user to release // Wait for user to release
while (pin_read(PIN_PWR_KEY)); while (pin_read(PIN_PWR_KEY));
_delay_ms(500); _delay_ms(100);
// shut down // shut down
pin_down(PIN_PWR_HOLD); pin_down(PIN_PWR_HOLD);

Loading…
Cancel
Save