Move Marauder splash screen to byte array

This commit is contained in:
Just Call Me Koko
2021-07-22 17:48:56 -04:00
parent a23e7a4c48
commit 9e1fe534b0
4 changed files with 863 additions and 10 deletions

View File

@@ -53,7 +53,7 @@ void Display::RunSetup()
// This should probably have its own class
if (!SPIFFS.begin()) {
Serial.println(F("SPIFFS initialisation failed!"));
while (1) yield(); // Stay here twiddling thumbs waiting
//while (1) yield(); // Stay here twiddling thumbs waiting
}
//this->initLVGL();
@@ -447,15 +447,16 @@ void Display::drawJpeg(const char *filename, int xpos, int ypos) {
fs::File jpegFile = SPIFFS.open( filename, "r"); // File handle reference for SPIFFS
//ESP32 always seems to return 1 for jpegFile so this null trap does not work
if ( !jpegFile ) {
Serial.print("ERROR: File \""); Serial.print(filename); Serial.println ("\" not found!");
return;
}
//if ( !jpegFile ) {
// Serial.print("ERROR: File \""); Serial.print(filename); Serial.println ("\" not found!");
// return;
//}
// Use one of the three following methods to initialise the decoder,
// the filename can be a String or character array type:
boolean decoded = JpegDec.decodeFsFile(filename); // or pass the filename (leading / distinguishes SPIFFS files)
//boolean decoded = JpegDec.decodeFsFile(filename); // or pass the filename (leading / distinguishes SPIFFS files)
boolean decoded = JpegDec.decodeArray(MarauderTitle, 13578);
if (decoded) {
// print information about the image to the serial port
@@ -619,7 +620,7 @@ void Display::jpegRender(int xpos, int ypos) {
// Print information decoded from the Jpeg image
//====================================================================================
void Display::jpegInfo() {
/*
Serial.println("===============");
Serial.println("JPEG image info");
Serial.println("===============");
@@ -633,7 +634,7 @@ void Display::jpegInfo() {
Serial.print ("MCU height :"); Serial.println(JpegDec.MCUHeight);
Serial.println("===============");
Serial.println("");
*/
}
//====================================================================================