mirror of
https://github.com/wled/WLED.git
synced 2025-07-15 14:56:32 +00:00
Merge pull request #2665 from Stoom/segment_bri_fix
🐛 fix(json): allow for using `~-16` or `~16` when setting a segments brightness though the JSON api
This commit is contained in:
commit
19c8b4fe2d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user