Add total heap and total psram into Info tab

This commit is contained in:
Ewowi
2022-09-20 10:58:59 +02:00
parent 4342cad1cd
commit 5aa7b34b05
6 changed files with 1929 additions and 1921 deletions

View File

@@ -698,8 +698,10 @@ void serializeInfo(JsonObject root)
root[F("lwip")] = LWIP_VERSION_MAJOR;
#endif
root[F("totalheap")] = ESP.getHeapSize(); //WLEDSR
root[F("freeheap")] = ESP.getFreeHeap();
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
if (psramFound()) root[F("tpram")] = ESP.getPsramSize(); //WLEDSR
if (psramFound()) root[F("psram")] = ESP.getFreePsram();
#endif
root[F("uptime")] = millis()/1000 + rolloverMillis*4294967;