Skip to content

Commit

Permalink
Add send and receive groups to json api
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomozippel committed Aug 13, 2023
1 parent 04aa9f0 commit 800abc6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wled00/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ bool deserializeState(JsonObject root, byte callMode, byte presetId)

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

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

root[F("lor")] = realtimeOverride;
}
Expand Down

0 comments on commit 800abc6

Please sign in to comment.