From b5737ce9c1029a0b20a131701686a227117b1d06 Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Sat, 21 Aug 2021 12:30:40 +0200 Subject: [PATCH] Shortened string. --- wled00/cfg.cpp | 8 ++++---- wled00/json.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index cce2b89b..8b31f5a7 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -237,7 +237,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { CJSON(receiveNotificationBrightness, if_sync_recv["bri"]); CJSON(receiveNotificationColor, if_sync_recv["col"]); CJSON(receiveNotificationEffects, if_sync_recv["fx"]); - CJSON(receiveGroups, if_sync_recv[F("groups")]); + CJSON(receiveGroups, if_sync_recv["grp"]); //! following line might be a problem if called after boot receiveNotifications = (receiveNotificationBrightness || receiveNotificationColor || receiveNotificationEffects); @@ -250,7 +250,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { CJSON(notifyHue, if_sync_send["hue"]); CJSON(notifyMacro, if_sync_send["macro"]); CJSON(notifyTwice, if_sync_send[F("twice")]); - CJSON(syncGroups, if_sync_send[F("groups")]); + CJSON(syncGroups, if_sync_send["grp"]); JsonObject if_nodes = interfaces["nodes"]; CJSON(nodeListEnabled, if_nodes[F("list")]); @@ -591,7 +591,7 @@ void serializeConfig() { if_sync_recv["bri"] = receiveNotificationBrightness; if_sync_recv["col"] = receiveNotificationColor; if_sync_recv["fx"] = receiveNotificationEffects; - if_sync_recv[F("groups")] = receiveGroups; + if_sync_recv["grp"] = receiveGroups; JsonObject if_sync_send = if_sync.createNestedObject("send"); if_sync_send[F("dir")] = notifyDirect; @@ -600,7 +600,7 @@ void serializeConfig() { if_sync_send["hue"] = notifyHue; if_sync_send["macro"] = notifyMacro; if_sync_send[F("twice")] = notifyTwice; - if_sync_send[F("groups")] = syncGroups; + if_sync_send["grp"] = syncGroups; JsonObject if_nodes = interfaces.createNestedObject("nodes"); if_nodes[F("list")] = nodeListEnabled; diff --git a/wled00/json.cpp b/wled00/json.cpp index eb02edbb..7d136d4a 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -22,7 +22,7 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId) uint16_t len = elem[F("len")]; stop = (len > 0) ? start + len : seg.stop; } - uint16_t grp = elem[F("grp")] | seg.grouping; + uint16_t grp = elem["grp"] | seg.grouping; uint16_t spc = elem[F("spc")] | seg.spacing; strip.setSegment(id, start, stop, grp, spc); @@ -332,7 +332,7 @@ void serializeSegment(JsonObject& root, WS2812FX::Segment& seg, byte id, bool fo root["stop"] = seg.stop; } if (!forPreset) root[F("len")] = seg.stop - seg.start; - root[F("grp")] = seg.grouping; + root["grp"] = seg.grouping; root[F("spc")] = seg.spacing; root[F("of")] = seg.offset; root["on"] = seg.getOption(SEG_OPTION_ON);