From fb44e020fc61aee8193a601c71d782f8fd7bbfbb Mon Sep 17 00:00:00 2001 From: Proddy Date: Sat, 2 Sep 2023 11:12:52 +0200 Subject: [PATCH] fix standalone build --- src/mqtt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index d62367503..7fc766964 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -592,7 +592,8 @@ bool Mqtt::queue_message(const uint8_t operation, const std::string & topic, con if (!mqtt_enabled_ || topic.empty()) { return false; // quit, not using MQTT } - // check free mem +// check free mem +#ifndef EMSESP_STANDALONE if (ESP.getFreeHeap() < 60 * 1204) { if (operation == Operation::PUBLISH) { mqtt_message_id_++; @@ -601,6 +602,7 @@ bool Mqtt::queue_message(const uint8_t operation, const std::string & topic, con LOG_DEBUG("%s failed: low memory", operation == Operation::PUBLISH ? "Publish" : operation == Operation::SUBSCRIBE ? "Subscribe" : "Unsubscribe"); return false; // quit } +#endif uint16_t packet_id = 0; char fulltopic[MQTT_TOPIC_MAX_SIZE];