Browse Source

small improvement, MQTT

pull/618/head
lumapu 2 years ago
parent
commit
a1aedce59e
  1. 3
      src/platformio.ini
  2. 2
      src/publisher/pubMqtt.h

3
src/platformio.ini

@ -48,7 +48,8 @@ lib_deps =
platform = espressif8266 platform = espressif8266
board = esp12e board = esp12e
board_build.f_cpu = 80000000L board_build.f_cpu = 80000000L
build_flags = -D RELEASE -Wl,-Map,output.map build_flags = -D RELEASE
;-Wl,-Map,output.map
monitor_filters = monitor_filters =
;default ; Remove typical terminal control codes from input ;default ; Remove typical terminal control codes from input
;time ; Add timestamp with milliseconds for each new line ;time ; Add timestamp with milliseconds for each new line

2
src/publisher/pubMqtt.h

@ -101,7 +101,7 @@ class PubMqtt {
if (mIntervalTimeout > 0) if (mIntervalTimeout > 0)
mIntervalTimeout--; mIntervalTimeout--;
if(!mClient.connected()) { if(mClient.disconnected()) {
mClient.connect(); mClient.connect();
return; // next try in a second return; // next try in a second
} }

Loading…
Cancel
Save