From ce725252ccd18d42a873a9bac298a239e722cf4e Mon Sep 17 00:00:00 2001 From: Blaz Kristan Date: Thu, 1 Jul 2021 16:40:55 +0200 Subject: [PATCH] Minor fixes. --- wled00/cfg.cpp | 4 +- wled00/data/index.css | 2 +- wled00/data/index.js | 33 +- wled00/html_ui.h | 3585 ++++++++++++++++++++--------------------- wled00/xml.cpp | 20 +- 5 files changed, 1815 insertions(+), 1829 deletions(-) diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index d261dee6..45e3bce8 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -121,7 +121,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { if (lC > ledCount) ledCount = lC; // fix incorrect total length (honour analog setup) // read multiple button configuration - JsonArray hw_btn_ins = hw[F("btn")][F("ins")]; + JsonArray hw_btn_ins = hw[F("btn")]["ins"]; if (!hw_btn_ins.isNull()) { uint8_t s = 0; for (JsonObject btn : hw_btn_ins) { @@ -342,7 +342,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { CJSON(macroCountdown, cntdwn[F("macro")]); setCountdown(); - JsonArray timers = tm[F("ins")]; + JsonArray timers = tm["ins"]; uint8_t it = 0; for (JsonObject timer : timers) { if (it > 9) break; diff --git a/wled00/data/index.css b/wled00/data/index.css index 95caa67c..f78493c8 100644 --- a/wled00/data/index.css +++ b/wled00/data/index.css @@ -591,7 +591,7 @@ input[type=range]::-moz-range-thumb { margin: 0px; } .btn-p { - width: 80%; + width: 165px; margin: 5px; } .btn-xs, .btn-pl-del, .btn-pl-add { diff --git a/wled00/data/index.js b/wled00/data/index.js index f5b625f7..816674b9 100644 --- a/wled00/data/index.js +++ b/wled00/data/index.js @@ -260,9 +260,9 @@ function onLoad() // Create UI update WS handler myWS = new WebSocket('ws://'+(loc?locip:window.location.hostname)+'/ws'); - myWS.onopen = function () { - myWS.send("{'v':true}"); - } +// myWS.onopen = function () { +// myWS.send("{'v':true}"); +// } myWS.onmessage = function(event) { var json = JSON.parse(event.data); if (handleJson(json.state)) updateUI(true); @@ -1067,11 +1067,7 @@ function handleJson(s) nlFade = s.nl.fade; syncSend = s.udpn.send; currentPreset = s.ps; - gId('cyToggle').checked = (s.pl >= 0); - gId('cycs').value = s.ccnf.min; - gId('cyce').value = s.ccnf.max; - gId('cyct').value = s.ccnf.time/10; - gId('cyctt').value = s.transition/10; + gId('tt').value = s.transition/10; var selc=0; var ind=0; populateSegments(s); @@ -1410,8 +1406,8 @@ ${plSelContent}
Save to ID 0)?i:getLowestUnusedP()}>
- - ${(i>0)?' + + ${(i>0)?'
${(i>0)? ('
ID ' +i+ '
'):""}`; @@ -1421,7 +1417,7 @@ function makePUtil() { gId('putil').innerHTML = `
${makeP(0)}
`; // updateTrail(gId('p0p')); - for (var i=0; i