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

File diff suppressed because one or more lines are too long

View File

@@ -53,7 +53,7 @@ void Display::RunSetup()
// This should probably have its own class // This should probably have its own class
if (!SPIFFS.begin()) { if (!SPIFFS.begin()) {
Serial.println(F("SPIFFS initialisation failed!")); Serial.println(F("SPIFFS initialisation failed!"));
while (1) yield(); // Stay here twiddling thumbs waiting //while (1) yield(); // Stay here twiddling thumbs waiting
} }
//this->initLVGL(); //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 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 //ESP32 always seems to return 1 for jpegFile so this null trap does not work
if ( !jpegFile ) { //if ( !jpegFile ) {
Serial.print("ERROR: File \""); Serial.print(filename); Serial.println ("\" not found!"); // Serial.print("ERROR: File \""); Serial.print(filename); Serial.println ("\" not found!");
return; // return;
} //}
// Use one of the three following methods to initialise the decoder, // Use one of the three following methods to initialise the decoder,
// the filename can be a String or character array type: // 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) { if (decoded) {
// print information about the image to the serial port // 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 // Print information decoded from the Jpeg image
//==================================================================================== //====================================================================================
void Display::jpegInfo() { void Display::jpegInfo() {
/*
Serial.println("==============="); Serial.println("===============");
Serial.println("JPEG image info"); Serial.println("JPEG image info");
Serial.println("==============="); Serial.println("===============");
@@ -633,7 +634,7 @@ void Display::jpegInfo() {
Serial.print ("MCU height :"); Serial.println(JpegDec.MCUHeight); Serial.print ("MCU height :"); Serial.println(JpegDec.MCUHeight);
Serial.println("==============="); Serial.println("===============");
Serial.println(""); Serial.println("");
*/
} }
//==================================================================================== //====================================================================================

View File

@@ -47,8 +47,8 @@
#define WIFI_ATTACK_BEACON_LIST 15 #define WIFI_ATTACK_BEACON_LIST 15
#define TFT_SHIELD #define TFT_SHIELD
//#define TFT_DIY #define TFT_DIY
//#define KIT #define KIT
#define SCREEN_WIDTH 240 #define SCREEN_WIDTH 240
#define SCREEN_HEIGHT 320 #define SCREEN_HEIGHT 320

View File

@@ -74,6 +74,8 @@ void setup()
Serial.begin(115200); Serial.begin(115200);
//Serial.begin(115200); //Serial.begin(115200);
Serial.println("ESP-IDF version is: " + String(esp_get_idf_version()));
display_obj.RunSetup(); display_obj.RunSetup();
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK); display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);