Embed logo in firmware as PROGMEM; no filesystem upload needed

This commit is contained in:
2026-06-29 00:50:18 +02:00
parent 991ab89a58
commit 52f8326c00
2 changed files with 2557 additions and 4 deletions
+2555
View File
File diff suppressed because it is too large Load Diff
+2 -4
View File
@@ -1,4 +1,5 @@
#include <Arduino.h> #include <Arduino.h>
#include "logo_png.h"
#include <WiFiManager.h> #include <WiFiManager.h>
#include <ESPmDNS.h> #include <ESPmDNS.h>
#include <LittleFS.h> #include <LittleFS.h>
@@ -232,10 +233,7 @@ static bool requireAuth() {
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
static void handleLogo() { static void handleLogo() {
File f = LittleFS.open("/logo.png", "r"); server.send_P(200, "image/png", (const char*)LOGO_PNG, LOGO_PNG_SIZE);
if (!f) { server.send(404, "text/plain", "Not found"); return; }
server.streamFile(f, "image/png");
f.close();
} }
static void handleRoot() { static void handleRoot() {