🐛 fix(json): allow for using ~-16
or ~16
when setting a segments brightness though the JSON api
This commit is contained in:
parent
bef9c68f81
commit
db8e1dec3e
@ -95,7 +95,7 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
|
|||||||
if (stop > start && of > len -1) of = len -1;
|
if (stop > start && of > len -1) of = len -1;
|
||||||
strip.setSegment(id, start, stop, grp, spc, of);
|
strip.setSegment(id, start, stop, grp, spc, of);
|
||||||
|
|
||||||
byte segbri = 0;
|
byte segbri = seg.opacity;
|
||||||
if (getVal(elem["bri"], &segbri)) {
|
if (getVal(elem["bri"], &segbri)) {
|
||||||
if (segbri > 0) seg.setOpacity(segbri, id);
|
if (segbri > 0) seg.setOpacity(segbri, id);
|
||||||
seg.setOption(SEG_OPTION_ON, segbri, id);
|
seg.setOption(SEG_OPTION_ON, segbri, id);
|
||||||
|
Loading…
Reference in New Issue
Block a user