mirror of
https://github.com/thelastoutpostworkshop/ESP32ManyRoundScreenTest.git
synced 2025-09-26 23:09:22 +08:00
bb8
This commit is contained in:
parent
7e1f732ba5
commit
715b4fbb73
@ -42,6 +42,8 @@ int AnimatedGIF::open(uint8_t *pData, int iDataSize, GIF_DRAW_CALLBACK *pfnDraw)
|
||||
if (_gif.usGIFTable == NULL)
|
||||
{
|
||||
// Handle memory allocation failure
|
||||
Serial.printf("Handle memory allocation failure \n");
|
||||
|
||||
return GIF_ERROR_MEMORY; // or an appropriate error code
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
#ifdef __LINUX__
|
||||
#define MAX_WIDTH 2048
|
||||
#else
|
||||
#define MAX_WIDTH 320
|
||||
#define MAX_WIDTH 240
|
||||
#endif // __LINUX__
|
||||
#define FILE_BUF_SIZE 4096
|
||||
|
||||
|
@ -21,11 +21,12 @@
|
||||
#include "images/hud_7.h"
|
||||
#include "images/darthvader.h"
|
||||
#include "images/x_wing.h"
|
||||
#include "images/bb8.h"
|
||||
|
||||
// Adjust this value based on the number of displays
|
||||
const int NUM_DISPLAYS = 6;
|
||||
// Add more CS pins if you have more displays, each display must have a dedicated pin
|
||||
const int CS_PINS[NUM_DISPLAYS] = {19, 22, 21,32,33,25};
|
||||
const int CS_PINS[NUM_DISPLAYS] = {19, 22, 21,32,33,26};
|
||||
|
||||
AnimatedGIF gif_1;
|
||||
AnimatedGIF gif_2;
|
||||
@ -54,8 +55,8 @@ void setup()
|
||||
openGif(&gif_2, hud_6, sizeof(hud_6));
|
||||
openGif(&gif_3, nostromo, sizeof(nostromo));
|
||||
openGif(&gif_4, x_wing, sizeof(x_wing));
|
||||
openGif(&gif_5, hud_2, sizeof(hud_2));
|
||||
openGif(&gif_6, hud_7, sizeof(hud_7));
|
||||
openGif(&gif_5, hud_7, sizeof(hud_7));
|
||||
openGif(&gif_6, bb8, sizeof(bb8));
|
||||
}
|
||||
void loop()
|
||||
{
|
||||
@ -87,6 +88,9 @@ void playGif(AnimatedGIF *gif, int screenIndex)
|
||||
gif->reset();
|
||||
gif->playFrame(false, NULL);
|
||||
}
|
||||
if(res == -1) {
|
||||
Serial.printf("Gif Error = %d \n",gif->getLastError());
|
||||
}
|
||||
tft.endWrite();
|
||||
digitalWrite(CS_PINS[screenIndex], HIGH); // Deselect the display
|
||||
}
|
||||
|
10490
images/bb8.h
Normal file
10490
images/bb8.h
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user