Skip to content

Commit

Permalink
Bugfix (#3526)
Browse files Browse the repository at this point in the history
  • Loading branch information
blazoncek committed Nov 15, 2023
1 parent 1049d65 commit 15797a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wled00/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@ void serializeSegment(JsonObject& root, Segment& seg, byte id, bool forPreset, b
root["cct"] = seg.cct;
root[F("set")] = seg.set;

if (segmentBounds && seg.name != nullptr) root["n"] = reinterpret_cast<const char *>(seg.name); //not good practice, but decreases required JSON buffer
if (seg.name != nullptr) root["n"] = reinterpret_cast<const char *>(seg.name); //not good practice, but decreases required JSON buffer
else if (forPreset) root["n"] = "";

// to conserve RAM we will serialize the col array manually
// this will reduce RAM footprint from ~300 bytes to 84 bytes per segment
Expand Down

0 comments on commit 15797a8

Please sign in to comment.