revert: restore pre-4b59b89 web server (drop chunked API + low-memory auto-reboot)

The chunked API handlers and the maxblock<6000 auto-restart from 4b59b89
broke the web UI on-device; restore the working String-based handlers and
plain loop while keeping the scrollable forecast log.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-21 08:48:25 +07:00
co-authored by Claude Opus 4.8
parent f8294d4aed
commit 2bf49c14ac
2 changed files with 19 additions and 31 deletions
-9
View File
@@ -88,15 +88,6 @@ void loop() {
tSample = now;
sampleNow();
displayRender(g_state);
Serial.printf("heap=%u maxblock=%u\n", ESP.getFreeHeap(), ESP.getMaxFreeBlockSize());
// Safety net: if the largest contiguous block gets too small, the TCP stack
// can no longer send responses. Persist and reboot to defragment.
if (ESP.getMaxFreeBlockSize() < 6000) {
Serial.println(F("Low memory -> saving history and restarting"));
historySave();
delay(50);
ESP.restart();
}
}
if (now - tHistory >= HISTORY_INTERVAL_MS) {