From 2e55c49a92ee5d62c7172dc3f8489e651288cb67 Mon Sep 17 00:00:00 2001 From: Mimoja Date: Mon, 19 Jun 2023 16:39:35 +0200 Subject: [PATCH] main: Print free heap in parallel to web interface Signed-off-by: Mimoja --- ESP32_AP-Flasher/src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ESP32_AP-Flasher/src/main.cpp b/ESP32_AP-Flasher/src/main.cpp index 9fcd7fe6..213edb4f 100644 --- a/ESP32_AP-Flasher/src/main.cpp +++ b/ESP32_AP-Flasher/src/main.cpp @@ -35,12 +35,15 @@ void delayedStart(void* parameter) { void timeTask(void* parameter) { wsSendSysteminfo(); + Serial.printf("Free heap: %.2f KB\n", ESP.getFreeHeap() / 1024.0f); while (1) { time_t now; time(&now); if (now % 5 == 0 || apInfo.state != AP_STATE_ONLINE || config.runStatus != RUNSTATUS_RUN) wsSendSysteminfo(); + if (now % 5 == 0) Serial.printf("Free heap: %.2f KB\n", ESP.getFreeHeap() / 1024.0f); if (now % 300 == 6 && config.runStatus != RUNSTATUS_STOP) saveDB("/current/tagDB.json"); + if (apInfo.state == AP_STATE_ONLINE) contentRunner(); vTaskDelay(1000 / portTICK_PERIOD_MS);