Skip to content

Commit d8952f3

Browse files
author
Scott Powell
committed
* ESP32Board: can now download entire log file via OTA webserver (URL: /log)
1 parent 810fc8b commit d8952f3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/helpers/ESP32Board.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include <ESPAsyncWebServer.h>
99
#include <AsyncElegantOTA.h>
1010

11+
#include <SPIFFS.h>
12+
1113
bool ESP32Board::startOTAUpdate(const char* id, char reply[]) {
1214
WiFi.softAP("MeshCore-OTA", NULL);
1315

@@ -24,6 +26,9 @@ bool ESP32Board::startOTAUpdate(const char* id, char reply[]) {
2426
server->on("/", HTTP_GET, [](AsyncWebServerRequest *request) {
2527
request->send(200, "text/html", home_buf);
2628
});
29+
server->on("/log", HTTP_GET, [](AsyncWebServerRequest *request) {
30+
request->send(SPIFFS, "/packet_log", "text/plain");
31+
});
2732

2833
AsyncElegantOTA.setID(id_buf);
2934
AsyncElegantOTA.begin(server); // Start ElegantOTA

0 commit comments

Comments
 (0)