Merge branch 'dev' into test-4ld
This commit is contained in:
commit
7dc41ab205
@ -537,7 +537,6 @@ img {
|
|||||||
#gwrap .sliderdisplay { background: linear-gradient(90deg, #000 0%, #0f0); }
|
#gwrap .sliderdisplay { background: linear-gradient(90deg, #000 0%, #0f0); }
|
||||||
#bwrap .sliderdisplay { background: linear-gradient(90deg, #000 0%, #00f); }
|
#bwrap .sliderdisplay { background: linear-gradient(90deg, #000 0%, #00f); }
|
||||||
#wwrap .sliderdisplay { background: linear-gradient(90deg, #000 0%, #fff); }
|
#wwrap .sliderdisplay { background: linear-gradient(90deg, #000 0%, #fff); }
|
||||||
/*#vwrap .sliderdisplay { background: linear-gradient(90deg, #000 0%, #fff); }*/
|
|
||||||
#kwrap .sliderdisplay { background: linear-gradient(90deg, #ff8f1f 0%, #fff 50%, #cbdbff); }
|
#kwrap .sliderdisplay { background: linear-gradient(90deg, #ff8f1f 0%, #fff 50%, #cbdbff); }
|
||||||
#wbal .sliderdisplay { background: linear-gradient(90deg, #ff8f1f 0%, #fff 50%, #cbdbff); }
|
#wbal .sliderdisplay { background: linear-gradient(90deg, #ff8f1f 0%, #fff 50%, #cbdbff); }
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ button:hover {
|
|||||||
}
|
}
|
||||||
#info table .btn, #nodes table .btn {
|
#info table .btn, #nodes table .btn {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 230px;
|
width: 180px;
|
||||||
}
|
}
|
||||||
#info div, #nodes div {
|
#info div, #nodes div {
|
||||||
width: 490px;
|
width: 490px;
|
||||||
@ -482,7 +482,8 @@ 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);
|
||||||
}
|
}
|
||||||
#kwrap, #wwrap, #wbal {
|
|
||||||
|
#picker, #rgbwrap, #kwrap, #vwrap, #wwrap, #wbal {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -497,11 +498,6 @@ input[type=range]::-moz-range-thumb {
|
|||||||
|
|
||||||
#picker {
|
#picker {
|
||||||
width: 260px;
|
width: 260px;
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#rgbwrap, #wwrap, #wbal {
|
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#picker, #csl, #segcont {
|
#picker, #csl, #segcont {
|
||||||
|
@ -115,6 +115,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="rgbwrap" class="center">
|
<div id="rgbwrap" class="center">
|
||||||
|
<p class="label hd">RGB channels</p>
|
||||||
<div id="rwrap" class="il">
|
<div id="rwrap" class="il">
|
||||||
<div class="sliderwrap il">
|
<div class="sliderwrap il">
|
||||||
<input id="sliderR" onchange="fromRgb()" max="255" min="0" type="range" value="128" />
|
<input id="sliderR" onchange="fromRgb()" max="255" min="0" type="range" value="128" />
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//page js
|
//page js
|
||||||
var loc = false, locip;
|
var loc = false, locip;
|
||||||
var noNewSegs = false;
|
var noNewSegs = false;
|
||||||
var isOn = false, isInfo = false, isNodes = false, isRgbw = false;
|
var isOn = false, isInfo = false, isNodes = false, isRgbw = false, cct = false;
|
||||||
var whites = [0,0,0];
|
var whites = [0,0,0];
|
||||||
var selColors;
|
var selColors;
|
||||||
var powered = [true];
|
var powered = [true];
|
||||||
@ -46,7 +46,8 @@ function applyCfg()
|
|||||||
if (bg) sCol('--c-1', bg);
|
if (bg) sCol('--c-1', bg);
|
||||||
var ccfg = cfg.comp.colors;
|
var ccfg = cfg.comp.colors;
|
||||||
//gId('picker').style.display = "none"; // ccfg.picker ? "block":"none";
|
//gId('picker').style.display = "none"; // ccfg.picker ? "block":"none";
|
||||||
gId('rgbwrap').style.display = ccfg.rgb ? "block":"none";
|
//gId('vwrap').style.display = "none"; // ccfg.picker ? "block":"none";
|
||||||
|
//gId('rgbwrap').style.display = ccfg.rgb ? "block":"none";
|
||||||
gId('qcs-w').style.display = ccfg.quick ? "block":"none";
|
gId('qcs-w').style.display = ccfg.quick ? "block":"none";
|
||||||
var l = cfg.comp.labels; //l = false;
|
var l = cfg.comp.labels; //l = false;
|
||||||
var e = d.querySelectorAll('.tab-label');
|
var e = d.querySelectorAll('.tab-label');
|
||||||
@ -481,39 +482,7 @@ function parseInfo() {
|
|||||||
syncTglRecv = li.str;
|
syncTglRecv = li.str;
|
||||||
maxSeg = li.leds.maxseg;
|
maxSeg = li.leds.maxseg;
|
||||||
pmt = li.fs.pmt;
|
pmt = li.fs.pmt;
|
||||||
}
|
cct = li.leds.cct;
|
||||||
|
|
||||||
function loadInfo(callback=null)
|
|
||||||
{
|
|
||||||
var url = (loc?`http://${locip}`:'') + '/json/info';
|
|
||||||
var useWs = (ws && ws.readyState === WebSocket.OPEN);
|
|
||||||
if (useWs) {
|
|
||||||
ws.send('{"v":true}');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fetch(url, {
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
.then(res => {
|
|
||||||
if (!res.ok) showToast('Could not load Info!', true);
|
|
||||||
return res.json();
|
|
||||||
})
|
|
||||||
.then(json => {
|
|
||||||
clearErrorToast();
|
|
||||||
lastinfo = json;
|
|
||||||
parseInfo();
|
|
||||||
if (isInfo) populateInfo(json);
|
|
||||||
updateUI();
|
|
||||||
reqsLegal = true;
|
|
||||||
if (!ws && lastinfo.ws > -1) setTimeout(makeWS,500);
|
|
||||||
})
|
|
||||||
.catch(function (error) {
|
|
||||||
showToast(error, true);
|
|
||||||
console.log(error);
|
|
||||||
})
|
|
||||||
.finally(()=>{
|
|
||||||
if (callback) callback();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateInfo(i)
|
function populateInfo(i)
|
||||||
@ -539,7 +508,7 @@ function populateInfo(i)
|
|||||||
if (i.ver.includes("-bl")) vcn = "Ryujin";
|
if (i.ver.includes("-bl")) vcn = "Ryujin";
|
||||||
if (i.cn) vcn = i.cn;
|
if (i.cn) vcn = i.cn;
|
||||||
|
|
||||||
cn += `v${i.ver} "${vcn}"<br><br><table class="infot">
|
cn += `v${i.ver} "${vcn}"<br><br><table>
|
||||||
${urows}
|
${urows}
|
||||||
${inforow("Build",i.vid)}
|
${inforow("Build",i.vid)}
|
||||||
${inforow("Signal strength",i.wifi.signal +"% ("+ i.wifi.rssi, " dBm)")}
|
${inforow("Signal strength",i.wifi.signal +"% ("+ i.wifi.rssi, " dBm)")}
|
||||||
@ -856,10 +825,12 @@ function updateUI()
|
|||||||
updateTrail(gId('sliderBri'));
|
updateTrail(gId('sliderBri'));
|
||||||
updateTrail(gId('sliderSpeed'));
|
updateTrail(gId('sliderSpeed'));
|
||||||
updateTrail(gId('sliderIntensity'));
|
updateTrail(gId('sliderIntensity'));
|
||||||
if (isRgbw) gId('wwrap').style.display = "block";
|
|
||||||
gId("wbal").style.display = (lastinfo.leds.cct) ? "block":"none";
|
|
||||||
|
|
||||||
updatePA(true);
|
gId('wwrap').style.display = (isRgbw) ? "block":"none";
|
||||||
|
gId("wbal").style.display = (cct) ? "block":"none";
|
||||||
|
gId('kwrap').style.display = (cct) ? "none":"block";
|
||||||
|
|
||||||
|
updatePA();
|
||||||
redrawPalPrev();
|
redrawPalPrev();
|
||||||
updatePSliders();
|
updatePSliders();
|
||||||
|
|
||||||
@ -877,7 +848,7 @@ function cmpP(a, b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
function makeWS() {
|
function makeWS() {
|
||||||
if (ws || lastinfo.ws<0) return;
|
if (ws) return;
|
||||||
ws = new WebSocket('ws://'+(loc?locip:window.location.hostname)+'/ws');
|
ws = new WebSocket('ws://'+(loc?locip:window.location.hostname)+'/ws');
|
||||||
ws.onmessage = function(event) {
|
ws.onmessage = function(event) {
|
||||||
var json = JSON.parse(event.data);
|
var json = JSON.parse(event.data);
|
||||||
@ -955,7 +926,11 @@ function readState(s,command=false)
|
|||||||
|
|
||||||
gId('sliderSpeed').value = i.sx;
|
gId('sliderSpeed').value = i.sx;
|
||||||
gId('sliderIntensity').value = i.ix;
|
gId('sliderIntensity').value = i.ix;
|
||||||
|
/*
|
||||||
|
gId('sliderC1').value = i.f1x ? i.f1x : 0;
|
||||||
|
gId('sliderC2').value = i.f2x ? i.f2x : 0;
|
||||||
|
gId('sliderC3').value = i.f3x ? i.f3x : 0;
|
||||||
|
*/
|
||||||
if (s.error && s.error != 0) {
|
if (s.error && s.error != 0) {
|
||||||
var errstr = "";
|
var errstr = "";
|
||||||
switch (s.error) {
|
switch (s.error) {
|
||||||
@ -1054,8 +1029,9 @@ function toggleInfo()
|
|||||||
{
|
{
|
||||||
if (isNodes) toggleNodes();
|
if (isNodes) toggleNodes();
|
||||||
isInfo = !isInfo;
|
isInfo = !isInfo;
|
||||||
if (isInfo) requestJson(); // loadInfo();
|
if (isInfo) requestJson();
|
||||||
gId('info').style.transform = (isInfo) ? "translateY(0px)":"translateY(100%)";
|
gId('info').style.transform = (isInfo) ? "translateY(0px)":"translateY(100%)";
|
||||||
|
gId('buttonI').className = (isInfo) ? "active":"";
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleNodes()
|
function toggleNodes()
|
||||||
@ -1064,6 +1040,7 @@ function toggleNodes()
|
|||||||
isNodes = !isNodes;
|
isNodes = !isNodes;
|
||||||
if (isNodes) loadNodes();
|
if (isNodes) loadNodes();
|
||||||
gId('nodes').style.transform = (isNodes) ? "translateY(0px)":"translateY(100%)";
|
gId('nodes').style.transform = (isNodes) ? "translateY(0px)":"translateY(100%)";
|
||||||
|
gId('buttonNodes').className = (isNodes) ? "active":"";
|
||||||
}
|
}
|
||||||
|
|
||||||
function tglBri(b=null)
|
function tglBri(b=null)
|
||||||
@ -1079,6 +1056,7 @@ function tglCP()
|
|||||||
var p = gId('buttonCP').className === "active";
|
var p = gId('buttonCP').className === "active";
|
||||||
gId('buttonCP').className = !p ? "active":"";
|
gId('buttonCP').className = !p ? "active":"";
|
||||||
gId('picker').style.display = !p ? "block":"none";
|
gId('picker').style.display = !p ? "block":"none";
|
||||||
|
gId('vwrap').style.display = !p ? "block":"none";
|
||||||
gId('rgbwrap').style.display = !p ? "block":"none";
|
gId('rgbwrap').style.display = !p ? "block":"none";
|
||||||
var csl = gId(`csl`).style.display === "block";
|
var csl = gId(`csl`).style.display === "block";
|
||||||
gId('csl').style.display = !csl ? "block":"none";
|
gId('csl').style.display = !csl ? "block":"none";
|
||||||
@ -1186,12 +1164,10 @@ function selectSlot(b)
|
|||||||
{
|
{
|
||||||
csel = b;
|
csel = b;
|
||||||
var cd = gId('csl').children;
|
var cd = gId('csl').children;
|
||||||
for (let i = 0; i < cd.length; i++) {
|
for (let i = 0; i < cd.length; i++) cd[i].classList.remove('xxs-w');
|
||||||
cd[i].classList.remove('xxs-w');
|
cd[b].classList.add('xxs-w');
|
||||||
}
|
setPicker(cd[b].style.backgroundColor);
|
||||||
cd[csel].classList.add('xxs-w');
|
gId('sliderW').value = whites[b];
|
||||||
cpick.color.set(cd[csel].style.backgroundColor);
|
|
||||||
gId('sliderW').value = whites[csel];
|
|
||||||
redrawPalPrev();
|
redrawPalPrev();
|
||||||
updatePSliders();
|
updatePSliders();
|
||||||
}
|
}
|
||||||
@ -1207,7 +1183,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1257,7 +1233,7 @@ 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})`);
|
||||||
setColor(0);
|
setColor(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1265,7 +1241,7 @@ function fromRgb()
|
|||||||
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);
|
||||||
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;
|
||||||
|
2246
wled00/html_simple.h
2246
wled00/html_simple.h
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2201031
|
#define VERSION 2201041
|
||||||
|
|
||||||
//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
|
||||||
|
Loading…
Reference in New Issue
Block a user