PSRAM Status (#159)

Show PSRAM on status screen
Use correct calculation for heap fragmentation
Fix display of application error component
This commit is contained in:
rjwats
2020-06-21 23:02:07 +01:00
committed by GitHub
parent f045e4d9e7
commit e86607bff3
4 changed files with 46 additions and 14 deletions

View File

@ -13,9 +13,12 @@ void SystemStatus::systemStatus(AsyncWebServerRequest* request) {
#ifdef ESP32
root["esp_platform"] = "esp32";
root["max_alloc_heap"] = ESP.getMaxAllocHeap();
root["psram_size"] = ESP.getPsramSize();
root["free_psram"] = ESP.getFreePsram();
#elif defined(ESP8266)
root["esp_platform"] = "esp8266";
root["max_alloc_heap"] = ESP.getMaxFreeBlockSize();
root["heap_fragmentation"] = ESP.getHeapFragmentation();
#endif
root["cpu_freq_mhz"] = ESP.getCpuFreqMHz();
root["free_heap"] = ESP.getFreeHeap();