mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-12 15:50:36 -08:00
Move Marauder splash screen to byte array
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -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("");
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//====================================================================================
|
//====================================================================================
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user