|
@ -53,7 +53,6 @@ class mqtt { |
|
|
char top[64]; |
|
|
char top[64]; |
|
|
snprintf(top, 64, "%s/%s", mCfg->topic, topic); |
|
|
snprintf(top, 64, "%s/%s", mCfg->topic, topic); |
|
|
sendMsg2(top, msg, false); |
|
|
sendMsg2(top, msg, false); |
|
|
mTxCnt++; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void sendMsg2(const char *topic, const char *msg, boolean retained) { |
|
|
void sendMsg2(const char *topic, const char *msg, boolean retained) { |
|
@ -63,6 +62,7 @@ class mqtt { |
|
|
if(mClient->connected()) |
|
|
if(mClient->connected()) |
|
|
mClient->publish(topic, msg, retained); |
|
|
mClient->publish(topic, msg, retained); |
|
|
} |
|
|
} |
|
|
|
|
|
mTxCnt++; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool isConnected(bool doRecon = false) { |
|
|
bool isConnected(bool doRecon = false) { |
|
|