Embed logo in firmware as PROGMEM; no filesystem upload needed
This commit is contained in:
+2555
File diff suppressed because it is too large
Load Diff
+2
-4
@@ -1,4 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include "logo_png.h"
|
||||
#include <WiFiManager.h>
|
||||
#include <ESPmDNS.h>
|
||||
#include <LittleFS.h>
|
||||
@@ -232,10 +233,7 @@ static bool requireAuth() {
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
static void handleLogo() {
|
||||
File f = LittleFS.open("/logo.png", "r");
|
||||
if (!f) { server.send(404, "text/plain", "Not found"); return; }
|
||||
server.streamFile(f, "image/png");
|
||||
f.close();
|
||||
server.send_P(200, "image/png", (const char*)LOGO_PNG, LOGO_PNG_SIZE);
|
||||
}
|
||||
|
||||
static void handleRoot() {
|
||||
|
||||
Reference in New Issue
Block a user