Skip to content

Commit 675c4db

Browse files
committed
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
1 parent 80faaf8 commit 675c4db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/Arduino_LED_Matrix/src/Arduino_LED_Matrix.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ class ArduinoLEDMatrix {
175175
}
176176
if(_callBack != nullptr){
177177
_callBack();
178-
_sequenceDone = true;
179178
}
179+
_sequenceDone = true;
180180
}
181181
memcpy(framebuffer, (uint32_t*)frame, sizeof(frame));
182182
}

0 commit comments

Comments
 (0)