only retain global/version and global/running
This commit is contained in:
@@ -485,8 +485,8 @@ void MqttHandler::run() {
|
|||||||
|
|
||||||
time(&now);
|
time(&now);
|
||||||
start = lastTaskRun = now;
|
start = lastTaskRun = now;
|
||||||
publishTopic(m_globalTopic+"version", PACKAGE_STRING "." REVISION);
|
publishTopic(m_globalTopic+"version", PACKAGE_STRING "." REVISION, true);
|
||||||
publishTopic(m_globalTopic+"running", "true");
|
publishTopic(m_globalTopic+"running", "true", true);
|
||||||
publishTopic(signalTopic, "false");
|
publishTopic(signalTopic, "false");
|
||||||
mosquitto_message_callback_set(m_mosquitto, on_message);
|
mosquitto_message_callback_set(m_mosquitto, on_message);
|
||||||
string subTopic = getTopic(NULL, "#");
|
string subTopic = getTopic(NULL, "#");
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ class MqttHandler : public DataSink, public DataSource, public Thread {
|
|||||||
* @param data the data string.
|
* @param data the data string.
|
||||||
* @param retain whether the topic shall be retained.
|
* @param retain whether the topic shall be retained.
|
||||||
*/
|
*/
|
||||||
void publishTopic(const string& topic, const string& data, bool retain = true);
|
void publishTopic(const string& topic, const string& data, bool retain = false);
|
||||||
|
|
||||||
/** the @a MessageMap instance. */
|
/** the @a MessageMap instance. */
|
||||||
MessageMap* m_messages;
|
MessageMap* m_messages;
|
||||||
|
|||||||
Reference in New Issue
Block a user