From f456531028a4abd0ecdfd7edb0fb01de1d9653fe Mon Sep 17 00:00:00 2001 From: Markus Ransberger Date: Tue, 31 Oct 2023 16:14:57 +0100 Subject: [PATCH] Add delay after logging for stability. --- src/matrix/animation_functions.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/matrix/animation_functions.cpp b/src/matrix/animation_functions.cpp index 94b8923..5dfb59f 100644 --- a/src/matrix/animation_functions.cpp +++ b/src/matrix/animation_functions.cpp @@ -305,6 +305,8 @@ int random_tetris(bool init) if (init || gameover) { logger.log_string("Init Tetris: init=" + String(init) + ", gameover=" + String(gameover)); + delay(10); + // clear local game screen for (int h = 0; h < MATRIX_HEIGHT + 3; h++) { @@ -364,6 +366,8 @@ int random_tetris(bool init) { // no more moving blocks -> check if game over or spawn new block logger.log_string("Tetris: No more Mover"); + delay(10); + gameover = false; // check if game was lost -> one pixel active in 4rd row (top row on the led grid) for (int s = 0; s < MATRIX_WIDTH; s++)