8989#include " homer_tiny.h"
9090#include " badgers.h"
9191
92- // add pattern name and sizeof(pattern ) to the below lists
93- const uint8_t * patternsList [] = { ucBadgers, homer_tiny };
94- const uint16_t patternsSizeList [] = { sizeof (ucBadgers), sizeof (homer_tiny) };
92+ // add gif name and sizeof(gif ) to the below lists
93+ const uint8_t * gifsList [] = { ucBadgers, homer_tiny };
94+ const uint16_t gifsSizeList [] = { sizeof (ucBadgers), sizeof (homer_tiny) };
9595
9696#define DISPLAY_TIME_SECONDS 10
9797#define NUMBER_FULL_CYCLES 100
@@ -130,8 +130,6 @@ SMARTMATRIX_ALLOCATE_SCROLLING_LAYER(scrollingLayer, kMatrixWidth, kMatrixHeight
130130 */
131131GifDecoder<kMatrixWidth , kMatrixHeight , 12 > decoder;
132132
133- int num_files;
134-
135133void screenClearCallback (void ) {
136134#if (USE_SMARTMATRIX == 1)
137135 backgroundLayer.fillScreen ({0 ,0 ,0 });
@@ -226,7 +224,7 @@ void loop() {
226224 playNextGif = false ;
227225
228226 // start decoding, skipping to the next GIF if there's an error
229- if (decoder.startDecoding ((uint8_t *)patternsList [index], patternsSizeList [index]) < 0 ) {
227+ if (decoder.startDecoding ((uint8_t *)gifsList [index], gifsSizeList [index]) < 0 ) {
230228 playNextGif = true ;
231229 return ;
232230 }
@@ -235,7 +233,7 @@ void loop() {
235233 displayStartTime_millis = now;
236234
237235 // get the index for the next pass through
238- index = (index+1 ) % (sizeof (patternsList )/sizeof (patternsList [0 ]));
236+ index = (index+1 ) % (sizeof (gifsList )/sizeof (gifsList [0 ]));
239237 }
240238
241239 // decode frame without delaying after decode
0 commit comments