From db8e1dec3e0dc4f500bc2167ba531df4e17b8c75 Mon Sep 17 00:00:00 2001 From: Jamie Stoom Date: Mon, 9 May 2022 17:33:15 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(json):=20allow=20for=20using?= =?UTF-8?q?=20`~-16`=20or=20`~16`=20when=20setting=20a=20segments=20bright?= =?UTF-8?q?ness=20though=20the=20JSON=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wled00/json.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/json.cpp b/wled00/json.cpp index 4c43c9f0..f92bd436 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -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);