Serve logo from LittleFS instead of PROGMEM

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