From d17582d69737afc65588f0bbbe55eb6d383b58d3 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 30 Aug 2023 13:39:19 +0200 Subject: [PATCH] mqtt check 60k free heap (not maxalloc), dev1c --- lib/espMqttClient/src/Config.h | 2 +- lib/espMqttClient/src/Helpers.h | 2 +- src/version.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/espMqttClient/src/Config.h b/lib/espMqttClient/src/Config.h index cbc79353b..3c3e5cc36 100644 --- a/lib/espMqttClient/src/Config.h +++ b/lib/espMqttClient/src/Config.h @@ -29,7 +29,7 @@ the LICENSE file. #endif #ifndef EMC_MIN_FREE_MEMORY -#define EMC_MIN_FREE_MEMORY 46080 +#define EMC_MIN_FREE_MEMORY 61440 #endif #ifndef EMC_ESP8266_MULTITHREADING diff --git a/lib/espMqttClient/src/Helpers.h b/lib/espMqttClient/src/Helpers.h index 88b3ba94d..ca12b8052 100644 --- a/lib/espMqttClient/src/Helpers.h +++ b/lib/espMqttClient/src/Helpers.h @@ -16,7 +16,7 @@ the LICENSE file. #define EMC_SEMAPHORE_TAKE() xSemaphoreTake(_xSemaphore, portMAX_DELAY) #define EMC_SEMAPHORE_GIVE() xSemaphoreGive(_xSemaphore) // #define EMC_GET_FREE_MEMORY() std::max(ESP.getMaxAllocHeap(), ESP.getMaxAllocPsram()) - #define EMC_GET_FREE_MEMORY() ESP.getMaxAllocHeap() + #define EMC_GET_FREE_MEMORY() ESP.getFreeHeap() #define EMC_YIELD() vTaskDelay(1) #define EMC_GENERATE_CLIENTID(x) snprintf(x, EMC_CLIENTID_LENGTH, "esp32%06llx", ESP.getEfuseMac()); #elif defined(ARDUINO_ARCH_ESP8266) diff --git a/src/version.h b/src/version.h index f34797afd..1074cf016 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.7.0-dev.1b" +#define EMSESP_APP_VERSION "3.7.0-dev.1c"