Bugfixes.
This commit is contained in:
parent
737151ba09
commit
5c7e3c6bab
@ -1020,8 +1020,8 @@ const char JSON_mode_names[] PROGMEM = R"=====([
|
|||||||
"Noise 4",
|
"Noise 4",
|
||||||
"Colortwinkles",
|
"Colortwinkles",
|
||||||
"Lake",
|
"Lake",
|
||||||
"Meteor",
|
"Meteor@!,Trail length;!,!,;!",
|
||||||
"Meteor Smooth",
|
"Meteor Smooth@!,Trail length;!,!,;!",
|
||||||
"Railway",
|
"Railway",
|
||||||
"Ripple",
|
"Ripple",
|
||||||
"Twinklefox",
|
"Twinklefox",
|
||||||
|
@ -543,6 +543,7 @@ void serializeConfig() {
|
|||||||
hw_led["cct"] = correctWB;
|
hw_led["cct"] = correctWB;
|
||||||
hw_led[F("cr")] = cctFromRgb;
|
hw_led[F("cr")] = cctFromRgb;
|
||||||
hw_led[F("cb")] = strip.cctBlending;
|
hw_led[F("cb")] = strip.cctBlending;
|
||||||
|
hw_led[F("rgbwm")] = Bus::getAutoWhiteMode();
|
||||||
|
|
||||||
JsonArray hw_led_ins = hw_led.createNestedArray("ins");
|
JsonArray hw_led_ins = hw_led.createNestedArray("ins");
|
||||||
|
|
||||||
@ -562,7 +563,6 @@ void serializeConfig() {
|
|||||||
ins["type"] = bus->getType() & 0x7F;
|
ins["type"] = bus->getType() & 0x7F;
|
||||||
ins["ref"] = bus->isOffRefreshRequired();
|
ins["ref"] = bus->isOffRefreshRequired();
|
||||||
ins[F("rgbw")] = bus->isRgbw();
|
ins[F("rgbw")] = bus->isRgbw();
|
||||||
ins[F("rgbwm")] = bus->getAutoWhiteMode();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// button(s)
|
// button(s)
|
||||||
|
@ -525,15 +525,7 @@ img {
|
|||||||
z-index: -1;
|
z-index: -1;
|
||||||
--bg: var(--c-f);
|
--bg: var(--c-f);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
#rwrap .sliderdisplay,
|
|
||||||
#gwrap .sliderdisplay,
|
|
||||||
#bwrap .sliderdisplay,
|
|
||||||
#wwrap .sliderdisplay,
|
|
||||||
#vwrap .sliderdisplay,
|
|
||||||
#kwrap .sliderdisplay,
|
|
||||||
#wbal .sliderdisplay,
|
|
||||||
*/
|
|
||||||
#Colors .sliderdisplay {
|
#Colors .sliderdisplay {
|
||||||
height: 28px;
|
height: 28px;
|
||||||
top: 0; bottom: 0;
|
top: 0; bottom: 0;
|
||||||
@ -580,15 +572,7 @@ input[type=range] {
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
#rwrap input[type=range],
|
|
||||||
#gwrap input[type=range],
|
|
||||||
#bwrap input[type=range],
|
|
||||||
#wwrap input[type=range],
|
|
||||||
#vwrap input[type=range],
|
|
||||||
#kwrap input[type=range],
|
|
||||||
#wbal input[type=range],
|
|
||||||
*/
|
|
||||||
#Colors input[type=range] {
|
#Colors input[type=range] {
|
||||||
width: 252px;
|
width: 252px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -625,30 +609,12 @@ input[type=range]::-moz-range-thumb {
|
|||||||
background: var(--c-f);
|
background: var(--c-f);
|
||||||
transform: translateY(5px);
|
transform: translateY(5px);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
#rwrap input[type=range]::-webkit-slider-thumb,
|
|
||||||
#gwrap input[type=range]::-webkit-slider-thumb,
|
|
||||||
#bwrap input[type=range]::-webkit-slider-thumb,
|
|
||||||
#wwrap input[type=range]::-webkit-slider-thumb,
|
|
||||||
#vwrap input[type=range]::-webkit-slider-thumb,
|
|
||||||
#kwrap input[type=range]::-webkit-slider-thumb,
|
|
||||||
#wbal input[type=range]::-webkit-slider-thumb,
|
|
||||||
*/
|
|
||||||
#Colors input[type=range]::-webkit-slider-thumb {
|
#Colors input[type=range]::-webkit-slider-thumb {
|
||||||
height: 18px;
|
height: 18px;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
border: 2px solid #000;
|
border: 2px solid #000;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
#rwrap input[type=range]::-moz-range-thumb,
|
|
||||||
#gwrap input[type=range]::-moz-range-thumb,
|
|
||||||
#bwrap input[type=range]::-moz-range-thumb,
|
|
||||||
#wwrap input[type=range]::-moz-range-thumb,
|
|
||||||
#vwrap input[type=range]::-moz-range-thumb,
|
|
||||||
#kwrap input[type=range]::-moz-range-thumb,
|
|
||||||
#wbal input[type=range]::-moz-range-thumb,
|
|
||||||
*/
|
|
||||||
#Colors input[type=range]::-moz-range-thumb {
|
#Colors input[type=range]::-moz-range-thumb {
|
||||||
border: 2px solid var(--c-1);
|
border: 2px solid var(--c-1);
|
||||||
}
|
}
|
||||||
@ -661,15 +627,6 @@ input[type=range]::-moz-range-thumb {
|
|||||||
width: 230px;
|
width: 230px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
#rwrap .sliderwrap,
|
|
||||||
#gwrap .sliderwrap,
|
|
||||||
#bwrap .sliderwrap,
|
|
||||||
#wwrap .sliderwrap,
|
|
||||||
#vwrap .sliderwrap,
|
|
||||||
#kwrap .sliderwrap,
|
|
||||||
#wbal .sliderwrap,
|
|
||||||
*/
|
|
||||||
#Colors .sliderwrap {
|
#Colors .sliderwrap {
|
||||||
width: 260px;
|
width: 260px;
|
||||||
margin: 10px 0 0;
|
margin: 10px 0 0;
|
||||||
|
@ -49,22 +49,21 @@
|
|||||||
<div id="Colors" class="tabcontent">
|
<div id="Colors" class="tabcontent">
|
||||||
<div id="picker" class="noslide"></div>
|
<div id="picker" class="noslide"></div>
|
||||||
<div id="vwrap">
|
<div id="vwrap">
|
||||||
<p class="labels hd">Value</p>
|
<!--p class="labels hd">Value</p-->
|
||||||
<div class="sliderwrap il">
|
<div class="sliderwrap il">
|
||||||
<input id="sliderV" class="noslide" oninput="fromV()" onchange="setColor(0)" max="100" min="0" type="range" value="100" step="any" />
|
<input id="sliderV" class="noslide" oninput="fromV()" onchange="setColor(0)" max="100" min="0" type="range" value="100" step="any" />
|
||||||
<div class="sliderdisplay"></div>
|
<div class="sliderdisplay"></div>
|
||||||
</div><br>
|
</div><br>
|
||||||
</div>
|
</div>
|
||||||
<div id="kwrap">
|
<div id="kwrap">
|
||||||
<p class="labels hd">White from K</p>
|
<!--p class="labels hd">Temperature</p-->
|
||||||
<div class="sliderwrap il">
|
<div class="sliderwrap il">
|
||||||
<!--input id="sliderK" class="noslide" oninput="fromK()" onchange="setBalance(Math.trunc((parseInt(this.value)-2400)/32))" max="10060" min="1900" type="range" value="5964" /-->
|
|
||||||
<input id="sliderK" class="noslide" oninput="fromK()" onchange="setColor(0)" max="10091" min="1900" type="range" value="6550" />
|
<input id="sliderK" class="noslide" oninput="fromK()" onchange="setColor(0)" max="10091" min="1900" type="range" value="6550" />
|
||||||
<div class="sliderdisplay"></div>
|
<div class="sliderdisplay"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="rgbwrap">
|
<div id="rgbwrap">
|
||||||
<p class="labels">RGB color</p>
|
<p class="labels hd">RGB color</p>
|
||||||
<div id="rwrap" class="il">
|
<div id="rwrap" class="il">
|
||||||
<div class="sliderwrap il">
|
<div class="sliderwrap il">
|
||||||
<input id="sliderR" class="noslide" oninput="fromRgb()" onchange="setColor(0)" max="255" min="0" type="range" value="128" />
|
<input id="sliderR" class="noslide" oninput="fromRgb()" onchange="setColor(0)" max="255" min="0" type="range" value="128" />
|
||||||
|
@ -1306,6 +1306,7 @@ function setSliderAndColorControl(idx/*, extra*/)
|
|||||||
// set html color items on/off
|
// set html color items on/off
|
||||||
var cslLabel = '';
|
var cslLabel = '';
|
||||||
var sep = '';
|
var sep = '';
|
||||||
|
var hide = true;
|
||||||
for (let i=0; i<gId("csl").children.length; i++) {
|
for (let i=0; i<gId("csl").children.length; i++) {
|
||||||
var btn = gId("csl" + i);
|
var btn = gId("csl" + i);
|
||||||
// if no controlDefined or coOnOff has a value
|
// if no controlDefined or coOnOff has a value
|
||||||
@ -1322,13 +1323,23 @@ function setSliderAndColorControl(idx/*, extra*/)
|
|||||||
else if (i==0) btn.innerHTML = "Fx";
|
else if (i==0) btn.innerHTML = "Fx";
|
||||||
else if (i==1) btn.innerHTML = "Bg";
|
else if (i==1) btn.innerHTML = "Bg";
|
||||||
else btn.innerHTML = "Cs";
|
else btn.innerHTML = "Cs";
|
||||||
|
hide = false;
|
||||||
} else if (!controlDefined /*|| paOnOff.length>0*/) { // if no controls then all buttons should be shown for color 1..3
|
} else if (!controlDefined /*|| paOnOff.length>0*/) { // if no controls then all buttons should be shown for color 1..3
|
||||||
btn.style.display = "inline";
|
btn.style.display = "inline";
|
||||||
btn.innerHTML = `${i+1}`;
|
btn.innerHTML = `${i+1}`;
|
||||||
|
hide = false;
|
||||||
} else {
|
} else {
|
||||||
btn.style.display = "none";
|
btn.style.display = "none";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var ccfg = cfg.comp.colors;
|
||||||
|
gId("picker").style.display = hide && ccfg.picker ? "none" : "block";
|
||||||
|
gId("vwrap").style.display = hide && ccfg.picker ? "none" : "block";
|
||||||
|
gId("kwrap").style.display = hide && ccfg.picker && cct ? "none" : "block";
|
||||||
|
gId("wwrap").style.display = hide ? "none" : "block";
|
||||||
|
gId("wbal").style.display = hide && !cct ? "none" : "block";
|
||||||
|
gId("rgbwrap").style.display = hide && ccfg.rgb ? "none" : "block";
|
||||||
|
gId("qcs-w").style.display = hide && ccfg.quick ? "none" : "block";
|
||||||
gId("cslLabel").innerHTML = cslLabel;
|
gId("cslLabel").innerHTML = cslLabel;
|
||||||
|
|
||||||
// set palette on/off
|
// set palette on/off
|
||||||
@ -1982,14 +1993,16 @@ function delP(i) {
|
|||||||
|
|
||||||
function selectSlot(b)
|
function selectSlot(b)
|
||||||
{
|
{
|
||||||
|
csel = b;
|
||||||
var cd = gId('csl').children;
|
var cd = gId('csl').children;
|
||||||
for (let i = 0; i < cd.length; i++) cd[i].classList.remove('xxs-w');
|
for (let i = 0; i < cd.length; i++) cd[i].classList.remove('xxs-w');
|
||||||
cd[b].classList.add('xxs-w');
|
cd[b].classList.add('xxs-w');
|
||||||
cpick.color.set(cd[b].style.backgroundColor);
|
setPicker(cd[b].style.backgroundColor);
|
||||||
gId('sliderW').value = whites[b];
|
gId('sliderW').value = whites[b];
|
||||||
updatePSliders();
|
updatePSliders();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//set the color from a hex string. Used by quick color selectors
|
||||||
var lasth = 0;
|
var lasth = 0;
|
||||||
function pC(col)
|
function pC(col)
|
||||||
{
|
{
|
||||||
@ -2001,7 +2014,7 @@ function pC(col)
|
|||||||
} while (Math.abs(col.h - lasth) < 50);
|
} while (Math.abs(col.h - lasth) < 50);
|
||||||
lasth = col.h;
|
lasth = col.h;
|
||||||
}
|
}
|
||||||
cpick.color.set(col);
|
setPicker(col);
|
||||||
setColor(0);
|
setColor(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2026,8 +2039,8 @@ function updatePSliders() {
|
|||||||
var hsv = {"h":cpick.color.hue,"s":cpick.color.saturation,"v":100};
|
var hsv = {"h":cpick.color.hue,"s":cpick.color.saturation,"v":100};
|
||||||
var c = iro.Color.hsvToRgb(hsv);
|
var c = iro.Color.hsvToRgb(hsv);
|
||||||
var cs = 'rgb('+c.r+','+c.g+','+c.b+')';
|
var cs = 'rgb('+c.r+','+c.g+','+c.b+')';
|
||||||
//v.parentNode.getElementsByClassName('sliderdisplay')[0].style.setProperty('--bg',cs);
|
|
||||||
v.nextElementSibling.style.backgroundImage = `linear-gradient(90deg, #000 0%, ${cs})`;
|
v.nextElementSibling.style.backgroundImage = `linear-gradient(90deg, #000 0%, ${cs})`;
|
||||||
|
//v.parentNode.getElementsByClassName('sliderdisplay')[0].style.setProperty('--bg',cs);
|
||||||
//updateTrail(v);
|
//updateTrail(v);
|
||||||
|
|
||||||
//update Kelvin slider
|
//update Kelvin slider
|
||||||
@ -2044,14 +2057,20 @@ function fromHex()
|
|||||||
var str = gId('hexc').value;
|
var str = gId('hexc').value;
|
||||||
whites[csel] = parseInt(str.substring(6), 16);
|
whites[csel] = parseInt(str.substring(6), 16);
|
||||||
try {
|
try {
|
||||||
cpick.color.set("#" + str.substring(0,6));
|
setPicker("#" + str.substring(0,6));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
cpick.color.set("#ffaa00");
|
setPicker("#ffaa00");
|
||||||
}
|
}
|
||||||
if (isNaN(whites[csel])) whites[csel] = 0;
|
if (isNaN(whites[csel])) whites[csel] = 0;
|
||||||
setColor(2);
|
setColor(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setPicker(rgb) {
|
||||||
|
var c = new iro.Color(rgb);
|
||||||
|
if (c.value > 0) cpick.color.set(c);
|
||||||
|
else cpick.color.setChannel('hsv', 'v', 0);
|
||||||
|
}
|
||||||
|
|
||||||
function fromV()
|
function fromV()
|
||||||
{
|
{
|
||||||
cpick.color.setChannel('hsv', 'v', d.getElementById('sliderV').value);
|
cpick.color.setChannel('hsv', 'v', d.getElementById('sliderV').value);
|
||||||
@ -2067,14 +2086,14 @@ function fromRgb()
|
|||||||
var r = gId('sliderR').value;
|
var r = gId('sliderR').value;
|
||||||
var g = gId('sliderG').value;
|
var g = gId('sliderG').value;
|
||||||
var b = gId('sliderB').value;
|
var b = gId('sliderB').value;
|
||||||
cpick.color.set(`rgb(${r},${g},${b})`);
|
setPicker(`rgb(${r},${g},${b})`);
|
||||||
}
|
}
|
||||||
|
|
||||||
//sr 0: from RGB sliders, 1: from picker, 2: from hex
|
//sr 0: from RGB sliders, 1: from picker, 2: from hex
|
||||||
function setColor(sr)
|
function setColor(sr)
|
||||||
{
|
{
|
||||||
var cd = gId('csl').children; // color slots
|
var cd = gId('csl').children; // color slots
|
||||||
if (sr == 1 && cd[csel].style.backgroundColor == 'rgb(0,0,0)') cpick.color.setChannel('hsv', 'v', 100);
|
if (sr == 1 && cd[csel].style.backgroundColor == "rgb(0, 0, 0)") cpick.color.setChannel('hsv', 'v', 100); // watch out for spaces!!!
|
||||||
cd[csel].style.backgroundColor = cpick.color.rgbString;
|
cd[csel].style.backgroundColor = cpick.color.rgbString;
|
||||||
if (sr != 2) whites[csel] = parseInt(gId('sliderW').value);
|
if (sr != 2) whites[csel] = parseInt(gId('sliderW').value);
|
||||||
var col = cpick.color.rgb;
|
var col = cpick.color.rgb;
|
||||||
@ -2231,11 +2250,13 @@ function formatArr(pl) {
|
|||||||
function expand(i,a=false)
|
function expand(i,a=false)
|
||||||
{
|
{
|
||||||
var seg = gId('seg' +i);
|
var seg = gId('seg' +i);
|
||||||
|
/*
|
||||||
if (!a) {
|
if (!a) {
|
||||||
var j = i>100 ? 100 : 0;
|
var j = i>100 ? 100 : 0;
|
||||||
var l = i>100 ? expanded.length : 100;
|
var l = i>100 ? expanded.length : 100;
|
||||||
for (; j<l; j++) if (i!=j && expanded[j]) expand(j,true); // collapse all expanded elements
|
for (; j<l; j++) if (i!=j && expanded[j]) expand(j,true); // collapse all expanded elements
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
expanded[i] = !expanded[i];
|
expanded[i] = !expanded[i];
|
||||||
seg.style.display = (expanded[i]) ? "block":"none";
|
seg.style.display = (expanded[i]) ? "block":"none";
|
||||||
gId('sege' +i).style.transform = (expanded[i]) ? "rotate(180deg)":"rotate(0deg)";
|
gId('sege' +i).style.transform = (expanded[i]) ? "rotate(180deg)":"rotate(0deg)";
|
||||||
|
1248
wled00/html_other.h
1248
wled00/html_other.h
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
3848
wled00/html_ui.h
3848
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@ -87,7 +87,6 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
|||||||
char cv[4] = "CV"; cv[2] = 48+s; cv[3] = 0; //strip reverse
|
char cv[4] = "CV"; cv[2] = 48+s; cv[3] = 0; //strip reverse
|
||||||
char sl[4] = "SL"; sl[2] = 48+s; sl[3] = 0; //skip 1st LED
|
char sl[4] = "SL"; sl[2] = 48+s; sl[3] = 0; //skip 1st LED
|
||||||
char rf[4] = "RF"; rf[2] = 48+s; rf[3] = 0; //refresh required
|
char rf[4] = "RF"; rf[2] = 48+s; rf[3] = 0; //refresh required
|
||||||
char aw[4] = "AW"; aw[2] = 48+s; aw[3] = 0; //auto white calculate mode
|
|
||||||
if (!request->hasArg(lp)) {
|
if (!request->hasArg(lp)) {
|
||||||
DEBUG_PRINTLN(F("No data.")); break;
|
DEBUG_PRINTLN(F("No data.")); break;
|
||||||
}
|
}
|
||||||
|
@ -281,6 +281,7 @@ void handleNotifications()
|
|||||||
//apply effects from notification
|
//apply effects from notification
|
||||||
if (version < 200 && (receiveNotificationEffects || !someSel))
|
if (version < 200 && (receiveNotificationEffects || !someSel))
|
||||||
{
|
{
|
||||||
|
if (currentPlaylist>=0) unloadPlaylist();
|
||||||
if (udpIn[8] < strip.getModeCount()) effectCurrent = udpIn[8];
|
if (udpIn[8] < strip.getModeCount()) effectCurrent = udpIn[8];
|
||||||
effectSpeed = udpIn[9];
|
effectSpeed = udpIn[9];
|
||||||
if (version > 2) effectIntensity = udpIn[16];
|
if (version > 2) effectIntensity = udpIn[16];
|
||||||
|
@ -50,6 +50,7 @@ void parseNumber(const char* str, byte* val, byte minv, byte maxv)
|
|||||||
|
|
||||||
bool getVal(JsonVariant elem, byte* val, byte vmin, byte vmax) {
|
bool getVal(JsonVariant elem, byte* val, byte vmin, byte vmax) {
|
||||||
if (elem.is<int>()) {
|
if (elem.is<int>()) {
|
||||||
|
if (elem < 0) return false; //ignore e.g. {"ps":-1}
|
||||||
*val = elem;
|
*val = elem;
|
||||||
return true;
|
return true;
|
||||||
} else if (elem.is<const char*>()) {
|
} else if (elem.is<const char*>()) {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2111301
|
#define VERSION 2112031
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
|
@ -348,7 +348,6 @@ void getSettingsJS(byte subPage, char* dest)
|
|||||||
char cv[4] = "CV"; cv[2] = 48+s; cv[3] = 0; //strip reverse
|
char cv[4] = "CV"; cv[2] = 48+s; cv[3] = 0; //strip reverse
|
||||||
char sl[4] = "SL"; sl[2] = 48+s; sl[3] = 0; //skip 1st LED
|
char sl[4] = "SL"; sl[2] = 48+s; sl[3] = 0; //skip 1st LED
|
||||||
char rf[4] = "RF"; rf[2] = 48+s; rf[3] = 0; //off refresh
|
char rf[4] = "RF"; rf[2] = 48+s; rf[3] = 0; //off refresh
|
||||||
char aw[4] = "AW"; aw[2] = 48+s; aw[3] = 0; //auto white channel calculation
|
|
||||||
oappend(SET_F("addLEDs(1);"));
|
oappend(SET_F("addLEDs(1);"));
|
||||||
uint8_t pins[5];
|
uint8_t pins[5];
|
||||||
uint8_t nPins = bus->getPins(pins);
|
uint8_t nPins = bus->getPins(pins);
|
||||||
@ -363,7 +362,6 @@ void getSettingsJS(byte subPage, char* dest)
|
|||||||
sappend('c',cv,bus->reversed);
|
sappend('c',cv,bus->reversed);
|
||||||
sappend('c',sl,bus->skippedLeds());
|
sappend('c',sl,bus->skippedLeds());
|
||||||
sappend('c',rf,bus->isOffRefreshRequired());
|
sappend('c',rf,bus->isOffRefreshRequired());
|
||||||
sappend('v',aw,bus->getAutoWhiteMode());
|
|
||||||
}
|
}
|
||||||
sappend('v',SET_F("MA"),strip.ablMilliampsMax);
|
sappend('v',SET_F("MA"),strip.ablMilliampsMax);
|
||||||
sappend('v',SET_F("LA"),strip.milliampsPerLed);
|
sappend('v',SET_F("LA"),strip.milliampsPerLed);
|
||||||
|
Loading…
Reference in New Issue
Block a user