Skip to content

Commit b29ebb2

Browse files
committed
pbio/sys/light_matrix: Fix crash on unfinished boot animation.
If we start a program on boot, the startup animation isn't finished. If we start the run animation then, we get a crash on running pbio_light_animation_stop_all after running the user program. Plenty of time wasted on this one. There is nothing wrong with the MicroPython exception handler. Thank you for reading.
1 parent e837f44 commit b29ebb2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/pbio/sys/light_matrix.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ void pbsys_hub_light_matrix_handle_user_program_start(void) {
166166
// The user animation updates only a subset of pixels to save time,
167167
// so the rest must be cleared before it starts.
168168
pbsys_hub_light_matrix_user_program_animation_clear();
169+
pbio_light_animation_stop_all();
169170
pbio_light_animation_init(&pbsys_hub_light_matrix->animation, pbsys_hub_light_matrix_user_program_animation_next);
170171
pbio_light_animation_start(&pbsys_hub_light_matrix->animation);
171172
}

0 commit comments

Comments
 (0)