- correct load sequence
- incorrect power on repeated segments
- update button
- fix for find icon
- connection icon colors
pull/2737/head
Blaz Kristan 2022-04-17 11:13:13 +02:00
rodzic 92cbdde429
commit 1663601dcb
5 zmienionych plików z 1719 dodań i 1709 usunięć

Wyświetl plik

@ -16,9 +16,10 @@
--c-c: #ccc;
--c-e: #eee;
--c-d: #ddd;
--c-r: #e42;
--c-g: #4e2;
--c-r: #c32;
--c-g: #2c1;
--c-l: #48a;
--c-y: #a90;
--t-b: 0.5;
--c-o: rgba(34, 34, 34, 0.9);
--c-tb : rgba(34, 34, 34, var(--t-b));
@ -1173,6 +1174,7 @@ textarea {
.fnd {
width: 280px;
margin: 0 auto;
position: relative;
}
input[type="text"].fnd {

Wyświetl plik

@ -299,6 +299,7 @@
<div>
<button class="btn infobtn" onclick="requestJson()">Refresh</button>
<button class="btn infobtn" onclick="toggleNodes()">Instance List</button>
<button class="btn infobtn" onclick="window.open('/update','_self');">Update WLED</button>
<button class="btn infobtn" id="resetbtn" onclick="cnfReset()">Reboot WLED</button>
</div>
<br>

Wyświetl plik

@ -240,14 +240,13 @@ function onLoad()
// Load initial data
loadPalettes(()=>{
loadPalettesData(redrawPalPrev);
// fill effect extra data array
loadFXData(()=>{
// load and populate effects
loadFX(()=>{
setTimeout(()=>{ // ESP8266 can't handle quick requests
loadPresets(()=>{
requestJson(); // will create WS
loadPalettesData(()=>{
requestJson();// will load presets and create WS
});
},100);
});
@ -1367,7 +1366,7 @@ var reqsLegal = false;
function requestJson(command=null)
{
gId('connind').style.backgroundColor = "var(--c-r)";
gId('connind').style.backgroundColor = "var(--c-y)";
if (command && !reqsLegal) return; // stop post requests from chrome onchange event on page restore
if (!jsonTimeout) jsonTimeout = setTimeout(()=>{if (ws) ws.close(); ws=null; showErrorToast()}, 3000);
var req = null;
@ -1418,8 +1417,12 @@ function requestJson(command=null)
}
var s = json.state ? json.state : json;
readState(s);
//load presets, and open websocket sequentially
setTimeout(()=>{
loadPresets(()=>{
if (!(ws && ws.readyState === WebSocket.OPEN)) makeWS();
if (!pJson) loadPresets();
});
},25);
reqsLegal = true;
})
.catch((e)=>{
@ -1814,7 +1817,7 @@ function rptSeg(s)
var mi = gId(`seg${s}mi`).checked;
var sel = gId(`seg${s}sel`).checked;
var pwr = gId(`seg${s}pwr`).classList.contains("act");
var obj = {"seg": {"id": s, "n": name, "start": start, "stop": (cfg.comp.seglen?start:0)+stop, "rev": rev, "mi": mi, "on": !pwr, "bri": parseInt(gId(`seg${s}bri`).value), "sel": sel}};
var obj = {"seg": {"id": s, "n": name, "start": start, "stop": (cfg.comp.seglen?start:0)+stop, "rev": rev, "mi": mi, "on": pwr, "bri": parseInt(gId(`seg${s}bri`).value), "sel": sel}};
if (gId(`seg${s}grp`)) {
var grp = parseInt(gId(`seg${s}grp`).value);
var spc = parseInt(gId(`seg${s}spc`).value);
@ -2259,7 +2262,7 @@ function loadPalettesData(callback = null)
var d = JSON.parse(lsPalData);
if (d && d.vid == d.vid) {
palettesData = d.p;
if (callback) callback(); // actually redrawPalPrev()
if (callback) callback();
return;
}
} catch (e) {}
@ -2271,7 +2274,8 @@ function loadPalettesData(callback = null)
p: palettesData,
vid: lastinfo.vid
}));
if (callback) setTimeout(callback, 99); // actually redrawPalPrev()
redrawPalPrev()
if (callback) setTimeout(callback, 99);
});
}

Plik diff jest za duży Load Diff

Wyświetl plik

@ -8,7 +8,7 @@
*/
// version code in format yymmddb (b = daily build)
#define VERSION 2204161
#define VERSION 2204171
//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG