Extend Status (#121)

* Added Sdk Version and ~heap fragmentation to system page
* Add flash chip speed to status page

Co-authored-by: kasedy <kasedy@gmail.com>
This commit is contained in:
rjwats
2020-05-21 22:52:07 +01:00
committed by GitHub
parent 13f97b630f
commit db0d98d425
3 changed files with 14 additions and 4 deletions

View File

@ -12,8 +12,10 @@ void SystemStatus::systemStatus(AsyncWebServerRequest* request) {
JsonObject root = response->getRoot();
#ifdef ESP32
root["esp_platform"] = "esp32";
root["max_alloc_heap"] = ESP.getMaxAllocHeap();
#elif defined(ESP8266)
root["esp_platform"] = "esp8266";
root["max_alloc_heap"] = ESP.getMaxFreeBlockSize();
#endif
root["cpu_freq_mhz"] = ESP.getCpuFreqMHz();
root["free_heap"] = ESP.getFreeHeap();