diff --git a/platformio.ini b/platformio.ini index 1a60e8c..3082db0 100644 --- a/platformio.ini +++ b/platformio.ini @@ -6,6 +6,8 @@ framework = arduino monitor_speed = 115200 monitor_filters = esp32_exception_decoder board_build.partitions = partitions_pd.csv +build_flags = -DBOARD_HAS_PSRAM + -mfix-esp32-psram-cache-issue # OTA ;upload_port = 192.168.178.60 diff --git a/src/app.cpp b/src/app.cpp index 8289737..402e9e9 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -79,7 +79,7 @@ void setupApp() doc["wifi"]["gateway"] = WiFi.gatewayIP().toString(); doc["device"]["id"] = DeviceId; - doc["device"]["heap"] = ESP.getFreeHeap(); + doc["device"]["time"] = time(NULL); doc["device"]["bootCycle"] = deviceGetBootCount(); doc["device"]["screen"]["width"] = 640; doc["device"]["screen"]["height"] = 384; @@ -87,7 +87,11 @@ void setupApp() doc["device"]["fs"]["total"] = SPIFFS.totalBytes(); doc["device"]["fs"]["used"] = SPIFFS.usedBytes(); doc["device"]["fs"]["free"] = SPIFFS.totalBytes() - SPIFFS.usedBytes(); - doc["device"]["time"] = time(NULL); + + doc["device"]["heap"]["total"] = ESP.getHeapSize(); + doc["device"]["heap"]["free"] = ESP.getFreeHeap(); + doc["device"]["psram"]["total"] = ESP.getPsramSize(); + doc["device"]["psram"]["free"] = ESP.getFreePsram(); doc["playlist"]["current"] = PlaylistGetCurrentFace(); doc["playlist"]["remaining"] = PlaylistGetRemainingTimeMs() / 1000;