🐛 fix(json): allow for using ~-16 or ~16 when setting a segments brightness though the JSON api

This commit is contained in:
Jamie Stoom 2022-05-09 17:33:15 -07:00
parent bef9c68f81
commit db8e1dec3e

View File

@ -95,7 +95,7 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
if (stop > start && of > len -1) of = len -1;
strip.setSegment(id, start, stop, grp, spc, of);
byte segbri = 0;
byte segbri = seg.opacity;
if (getVal(elem["bri"], &segbri)) {
if (segbri > 0) seg.setOpacity(segbri, id);
seg.setOption(SEG_OPTION_ON, segbri, id);