main: Print free heap in parallel to web interface

Signed-off-by: Mimoja <git@mimoja.de>
This commit is contained in:
Mimoja
2023-06-19 16:39:35 +02:00
parent e45845e00e
commit 2e55c49a92

View File

@@ -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);