mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix standalone build
This commit is contained in:
@@ -593,6 +593,7 @@ bool Mqtt::queue_message(const uint8_t operation, const std::string & topic, con
|
|||||||
return false; // quit, not using MQTT
|
return false; // quit, not using MQTT
|
||||||
}
|
}
|
||||||
// check free mem
|
// check free mem
|
||||||
|
#ifndef EMSESP_STANDALONE
|
||||||
if (ESP.getFreeHeap() < 60 * 1204) {
|
if (ESP.getFreeHeap() < 60 * 1204) {
|
||||||
if (operation == Operation::PUBLISH) {
|
if (operation == Operation::PUBLISH) {
|
||||||
mqtt_message_id_++;
|
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");
|
LOG_DEBUG("%s failed: low memory", operation == Operation::PUBLISH ? "Publish" : operation == Operation::SUBSCRIBE ? "Subscribe" : "Unsubscribe");
|
||||||
return false; // quit
|
return false; // quit
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
uint16_t packet_id = 0;
|
uint16_t packet_id = 0;
|
||||||
char fulltopic[MQTT_TOPIC_MAX_SIZE];
|
char fulltopic[MQTT_TOPIC_MAX_SIZE];
|
||||||
|
|||||||
Reference in New Issue
Block a user