mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-27 23:12:39 +00:00
MQTT: don't subscribe to JSON topic if JSON is disabled in config.
This commit is contained in:
parent
70d44b8838
commit
9665c08b59
@ -176,12 +176,14 @@ void MQTT::sendSubscriptions()
|
|||||||
String topic = cryptTopic + channels.getGlobalId(i) + "/#";
|
String topic = cryptTopic + channels.getGlobalId(i) + "/#";
|
||||||
DEBUG_MSG("Subscribing to %s\n", topic.c_str());
|
DEBUG_MSG("Subscribing to %s\n", topic.c_str());
|
||||||
pubSub.subscribe(topic.c_str(), 1); // FIXME, is QOS 1 right?
|
pubSub.subscribe(topic.c_str(), 1); // FIXME, is QOS 1 right?
|
||||||
|
if (moduleConfig.mqtt.json_enabled == true) {
|
||||||
String topicDecoded = jsonTopic + channels.getGlobalId(i) + "/#";
|
String topicDecoded = jsonTopic + channels.getGlobalId(i) + "/#";
|
||||||
DEBUG_MSG("Subscribing to %s\n", topicDecoded.c_str());
|
DEBUG_MSG("Subscribing to %s\n", topicDecoded.c_str());
|
||||||
pubSub.subscribe(topicDecoded.c_str(), 1); // FIXME, is QOS 1 right?
|
pubSub.subscribe(topicDecoded.c_str(), 1); // FIXME, is QOS 1 right?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool MQTT::wantsLink() const
|
bool MQTT::wantsLink() const
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user