Browse Source

Update zeroExport.h

discard change
pull/1581/head
tictrick 9 months ago
committed by GitHub
parent
commit
5a0b095f07
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      src/plugins/zeroExport/zeroExport.h

3
src/plugins/zeroExport/zeroExport.h

@ -474,11 +474,12 @@ class ZeroExport {
*/ */
void onMqttMessage(JsonObject obj) { void onMqttMessage(JsonObject obj) {
if (!mIsInitialized) return; if (!mIsInitialized) return;
mLog["t"] = "onMqttMessage";
String topic = String(obj["topic"]); String topic = String(obj["topic"]);
if (!topic.indexOf("/zero/set/")) return; if (!topic.indexOf("/zero/set/")) return;
mLog["t"] = "onMqttMessage";
if (obj["path"] == "zero" && obj["cmd"] == "set") { if (obj["path"] == "zero" && obj["cmd"] == "set") {
int8_t topicGroup = getGroupFromTopic(topic.c_str()); int8_t topicGroup = getGroupFromTopic(topic.c_str());
mLog["topicGroup"] = topicGroup; mLog["topicGroup"] = topicGroup;

Loading…
Cancel
Save