small changes to info page

- added "max used PSRAM" info
- moved all mem infos into one part
- only check PSRAM if BOARD_HAS_PSRAM
- oappend: debug message in case that stack buffer is too small.
This commit is contained in:
Frank
2022-10-17 15:40:56 +02:00
parent cb45f293dd
commit 72851b5725
5 changed files with 34 additions and 9 deletions

View File

@@ -767,9 +767,18 @@ void serializeInfo(JsonObject root)
#endif
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();
root[F("minfreeheap")] = ESP.getMinFreeHeap();
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM) && defined(BOARD_HAS_PSRAM)
if (psramFound()) {
root[F("tpram")] = ESP.getPsramSize(); //WLEDSR
root[F("psram")] = ESP.getFreePsram();
root[F("psusedram")] = ESP.getMinFreePsram();
}
#else
// for testing
// root[F("tpram")] = 4194304; //WLEDSR
// root[F("psram")] = 4193000;
// root[F("psusedram")] = 3083000;
#endif
// begin WLEDSR