Redesign web server to avoid lengthy system stats retrieval

This commit is contained in:
jpirnay
2026-04-11 08:28:06 +02:00
parent c0399185ce
commit d37621574c
14 changed files with 349 additions and 10 deletions
+3
View File
@@ -2,6 +2,7 @@
#include <Arduino.h>
#include <HalStorage.h>
#include <Logging.h>
#include <WiFi.h>
#include <esp_heap_caps.h>
@@ -72,9 +73,11 @@ struct SystemStatus {
}
static void fillSdStatus(SystemStatus& s) {
uint32_t t0 = millis();
s.sdTotalBytes = Storage.sdTotalBytes();
s.sdUsedBytes = Storage.sdUsedBytes();
s.sdFreeBytes = Storage.sdFreeBytes();
LOG_DBG("SYSINFO", "Filled SD status in %u ms", millis() - t0);
}
static SystemStatus collect() {