Skip to content

Commit

Permalink
Bugfix (Aircoookie#3526)
Browse files Browse the repository at this point in the history
  • Loading branch information
blazoncek authored and softhack007 committed Nov 27, 2023
1 parent fd95f80 commit ca3708e
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 @@ -620,7 +620,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 ca3708e

Please sign in to comment.