Skip to content

Commit a2bda5a

Browse files
authored
Merge pull request wled#3317 from chroma-tech/group-masks-api
Add send and receive groups to json api
2 parents 04aa9f0 + 800abc6 commit a2bda5a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

wled00/json.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,9 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)
347347

348348
JsonObject udpn = root["udpn"];
349349
notifyDirect = udpn["send"] | notifyDirect;
350+
syncGroups = udpn["sgrp"] | syncGroups;
350351
receiveNotifications = udpn["recv"] | receiveNotifications;
352+
receiveGroups = udpn["rgrp"] | receiveGroups;
351353
if ((bool)udpn[F("nn")]) callMode = CALL_MODE_NO_NOTIFY; //send no notification just for this request
352354

353355
unsigned long timein = root["time"] | UINT32_MAX; //backup time source if NTP not synced
@@ -564,6 +566,8 @@ void serializeState(JsonObject root, bool forPreset, bool includeBri, bool segme
564566
JsonObject udpn = root.createNestedObject("udpn");
565567
udpn["send"] = notifyDirect;
566568
udpn["recv"] = receiveNotifications;
569+
udpn["sgrp"] = syncGroups;
570+
udpn["rgrp"] = receiveGroups;
567571

568572
root[F("lor")] = realtimeOverride;
569573
}

0 commit comments

Comments
 (0)