bugfix: update Flash Usage after file upload

if we have the flicker-free RMT driver, also update FS usage info when filling /json/state
This commit is contained in:
Frank
2026-03-29 22:14:20 +02:00
parent f5c11f2e2e
commit 7bd8d5008b
2 changed files with 4 additions and 0 deletions

View File

@@ -1078,6 +1078,9 @@ void serializeInfo(JsonObject root)
wifi_info[F("channel")] = WiFi.channel();
wifi_info[F("ap")] = apActive;
#if defined(ARDUINO_ARCH_ESP32) && !defined(WLEDMM_FILEWAIT)
updateFSInfo(); // refresh flash usage info - may cause flicker unless we have the RMTHI driver
#endif
JsonObject fs_info = root.createNestedObject("fs");
fs_info["u"] = fsBytesUsed / 1000;
fs_info["t"] = fsBytesTotal / 1000;

View File

@@ -126,6 +126,7 @@ void handleUpload(AsyncWebServerRequest *request, const String& filename, size_t
request->send(200, "text/plain", F("File Uploaded!"));
}
cacheInvalidate++;
updateFSInfo(); // refresh memory usage info
}
}