From 675c4db6eef1b9fc6bc6a4289551c8b44b31e835 Mon Sep 17 00:00:00 2001 From: kurte Date: Fri, 28 Jul 2023 06:12:13 -0700 Subject: [PATCH] LED_matrix: move _sequenceDone = true out of if block Currently if you write a sketch that relies on knowing when a sequence completes, by having your code call sequenceDone(), this will only work if your sketch sets a non-null callback function, as the code that sets the condition is currently in the if block: ``` if(_callBack != nullptr){ ``` Simply moved the line to after the if block --- libraries/Arduino_LED_Matrix/src/Arduino_LED_Matrix.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Arduino_LED_Matrix/src/Arduino_LED_Matrix.h b/libraries/Arduino_LED_Matrix/src/Arduino_LED_Matrix.h index e252926d5..7de830acb 100644 --- a/libraries/Arduino_LED_Matrix/src/Arduino_LED_Matrix.h +++ b/libraries/Arduino_LED_Matrix/src/Arduino_LED_Matrix.h @@ -175,8 +175,8 @@ class ArduinoLEDMatrix { } if(_callBack != nullptr){ _callBack(); - _sequenceDone = true; } + _sequenceDone = true; } memcpy(framebuffer, (uint32_t*)frame, sizeof(frame)); }