update espMqttClient, add own mqtt limit, fix queue display, 3.7.0-dev1d

This commit is contained in:
MichaelDvP
2023-08-31 08:09:54 +02:00
parent 7e45c89fcd
commit 120c0b5ca2
5 changed files with 17 additions and 8 deletions

View File

@@ -29,7 +29,7 @@ the LICENSE file.
#endif
#ifndef EMC_MIN_FREE_MEMORY
#define EMC_MIN_FREE_MEMORY 61440
#define EMC_MIN_FREE_MEMORY 16384
#endif
#ifndef EMC_ESP8266_MULTITHREADING
@@ -37,7 +37,7 @@ the LICENSE file.
#endif
#ifndef EMC_ALLOW_NOT_CONNECTED_PUBLISH
#define EMC_ALLOW_NOT_CONNECTED_PUBLISH 0
#define EMC_ALLOW_NOT_CONNECTED_PUBLISH 1
#endif
#ifndef EMC_WAIT_FOR_CONNACK

View File

@@ -15,8 +15,7 @@ the LICENSE file.
#include "esp_task_wdt.h"
#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.getFreeHeap()
#define EMC_GET_FREE_MEMORY() std::max(ESP.getMaxAllocHeap(), ESP.getMaxAllocPsram())
#define EMC_YIELD() vTaskDelay(1)
#define EMC_GENERATE_CLIENTID(x) snprintf(x, EMC_CLIENTID_LENGTH, "esp32%06llx", ESP.getEfuseMac());
#elif defined(ARDUINO_ARCH_ESP8266)

View File

@@ -131,7 +131,7 @@ class MqttClient {
uint32_t timeSent;
espMqttClientInternals::Packet packet;
template <typename... Args>
OutgoingPacket(uint32_t t, espMqttClientTypes::Error error, Args &&... args)
OutgoingPacket(uint32_t t, espMqttClientTypes::Error & error, Args &&... args)
: timeSent(t)
, packet(error, std::forward<Args>(args)...) {
}