From 23916268f568a390ca466646475f321860d0a3ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Mon, 14 Aug 2023 13:01:16 +0200 Subject: [PATCH] Merge pull request #3317 from chroma-tech/group-masks-api Add send and receive groups to json api --- wled00/json.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wled00/json.cpp b/wled00/json.cpp index 6737a00f..a33eb7de 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -457,7 +457,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 @@ -698,6 +700,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; }