mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
Fix mqtt publish length bug
This commit is contained in:
parent
a3b358f738
commit
bea980056a
@ -154,8 +154,8 @@ void IRAM_ATTR mqtt_send_state(const __FlashStringHelper * subtopic, const char
|
||||
|
||||
// if(mqttIsConnected()) {
|
||||
char tmp_topic[strlen(mqttNodeTopic) + 20];
|
||||
size_t len = snprintf_P(tmp_topic, sizeof(tmp_topic), PSTR("%sstate/%s"), mqttNodeTopic, subtopic);
|
||||
bool res = mqttPublish(tmp_topic, payload, len);
|
||||
snprintf_P(tmp_topic, sizeof(tmp_topic), PSTR("%sstate/%s"), mqttNodeTopic, subtopic);
|
||||
bool res = mqttPublish(tmp_topic, payload, strlen(payload));
|
||||
mqttResult(res, tmp_topic, payload);
|
||||
// } else {
|
||||
// return mqtt_log_no_connection();
|
||||
|
@ -68,7 +68,7 @@ void tftShowConfig(TFT_eSPI & tft)
|
||||
Log.verbose(TAG_TFT, F("Transactns : %s"), (tftSetup.trans == 1) ? PSTR("Yes") : PSTR("No"));
|
||||
Log.verbose(TAG_TFT, F("Interface : %s"), (tftSetup.serial == 1) ? PSTR("SPI") : PSTR("Parallel"));
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
Log.verbose(TAG_TFT, F("SPI overlap : %s"), (tftSetup.overlap == 1) ? PSTR("Yes") : PSTR("No"));
|
||||
Log.verbose(TAG_TFT, F("SPI overlap: %s"), (tftSetup.overlap == 1) ? PSTR("Yes") : PSTR("No"));
|
||||
#endif
|
||||
|
||||
if(tftSetup.tft_driver != 0xE9D) // For ePaper displays the size is defined in the sketch
|
||||
|
Loading…
x
Reference in New Issue
Block a user