Settings cleanup for pins.
This commit is contained in:
parent
7078c91f7d
commit
40780ccec7
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wled",
|
"name": "wled",
|
||||||
"version": "0.12.0-b5",
|
"version": "0.12.0-b6",
|
||||||
"description": "Tools for WLED project",
|
"description": "Tools for WLED project",
|
||||||
"main": "tools/cdata.js",
|
"main": "tools/cdata.js",
|
||||||
"directories": {
|
"directories": {
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
if (nm=="L0" || nm=="L1" || nm=="L2" || nm=="L3" || nm=="L4" || nm=="RL" || nm=="BT" || nm=="IR" || nm=="AX")
|
if (nm=="L0" || nm=="L1" || nm=="L2" || nm=="L3" || nm=="L4" || nm=="RL" || nm=="BT" || nm=="IR" || nm=="AX")
|
||||||
if (LCs[i].value!="" && LCs[i].value!="-1") {
|
if (LCs[i].value!="" && LCs[i].value!="-1") {
|
||||||
/*if (LCs[i].value > 5 && LCs[i].value < 12) {alert("Sorry, pins 6-11 can not be used.");LCs[i].focus();return;}*/
|
/*if (LCs[i].value > 5 && LCs[i].value < 12) {alert("Sorry, pins 6-11 can not be used.");LCs[i].focus();return;}*/
|
||||||
if (d.um_p && d.um_p.some((e)=>e==parseInt(LCs[i].value,10))) {alert("Usermod/reserved pin conflict!");LCs[i].focus();return;}
|
if (d.um_p && d.um_p.some((e)=>e==parseInt(LCs[i].value,10))) {alert(`Sorry, pins ${JSON.stringify(d.um_p)} can't be used.`);LCs[i].focus();return;}
|
||||||
for (j=i+1; j<LCs.length; j++)
|
for (j=i+1; j<LCs.length; j++)
|
||||||
{
|
{
|
||||||
var n2 = LCs[j].name.substring(0,2);
|
var n2 = LCs[j].name.substring(0,2);
|
||||||
@ -66,10 +66,6 @@
|
|||||||
case 255: d.Sf.LAsel.value = 255; break;
|
case 255: d.Sf.LAsel.value = 255; break;
|
||||||
default: d.getElementById('LAdis').style.display = 'inline';
|
default: d.getElementById('LAdis').style.display = 'inline';
|
||||||
}
|
}
|
||||||
var RL=d.getElementsByName("RL")[0]; if (RL.value=="-1") {RL.readOnly=true;} else {d.getElementById("cRL").checked=true;}
|
|
||||||
var BT=d.getElementsByName("BT")[0]; if (BT.value=="-1") {BT.readOnly=true;} else {d.getElementById("cBT").checked=true;}
|
|
||||||
var IR=d.getElementsByName("IR")[0]; if (IR.value=="-1") {IR.readOnly=true;} else {d.getElementById("cIR").checked=true;}
|
|
||||||
var AX=d.getElementsByName("AX")[0]; if (AX.value=="-1") {AX.readOnly=true;} else {d.getElementById("cAX").checked=true;}
|
|
||||||
d.getElementById('m1').innerHTML = maxM;
|
d.getElementById('m1').innerHTML = maxM;
|
||||||
UI();
|
UI();
|
||||||
}
|
}
|
||||||
@ -161,7 +157,7 @@
|
|||||||
}
|
}
|
||||||
if (nm=="L0" || nm=="L1" || nm=="L2" || nm=="L3" || nm=="L4" || nm=="RL" || nm=="BT" || nm=="IR" || nm=="AX")
|
if (nm=="L0" || nm=="L1" || nm=="L2" || nm=="L3" || nm=="L4" || nm=="RL" || nm=="BT" || nm=="IR" || nm=="AX")
|
||||||
if (LCs[i].value!="" && LCs[i].value!="-1") {
|
if (LCs[i].value!="" && LCs[i].value!="-1") {
|
||||||
if (d.um_p && d.um_p.some((e)=>e==parseInt(LCs[i].value,10))) {alert("Usermod/reserved pin conflict!");/*LCs[i].value=""*/;LCs[i].focus();continue;}
|
if (d.um_p && d.um_p.some((e)=>e==parseInt(LCs[i].value,10))) {alert(`Sorry, pins ${JSON.stringify(d.um_p)} can't be used.`);LCs[i].focus();continue;}
|
||||||
for (j=0; j<LCs.length; j++) {
|
for (j=0; j<LCs.length; j++) {
|
||||||
if (i==j) continue;
|
if (i==j) continue;
|
||||||
var n2 = LCs[j].name.substring(0,2);
|
var n2 = LCs[j].name.substring(0,2);
|
||||||
@ -178,6 +174,11 @@
|
|||||||
if (i == 1) d.getElementsByName("LC0")[0].value = d.getElementsByName("LC")[0].value;
|
if (i == 1) d.getElementsByName("LC0")[0].value = d.getElementsByName("LC")[0].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var RL=d.getElementsByName("RL")[0]; RL.readOnly=(RL.value=="-1"); d.getElementById("cRL").checked=(RL.value!="-1");
|
||||||
|
var BT=d.getElementsByName("BT")[0]; BT.readOnly=(BT.value=="-1"); d.getElementById("cBT").checked=(BT.value!="-1");
|
||||||
|
var IR=d.getElementsByName("IR")[0]; IR.readOnly=(IR.value=="-1"); d.getElementById("cIR").checked=(IR.value!="-1");
|
||||||
|
var AX=d.getElementsByName("AX")[0]; AX.readOnly=(AX.value=="-1"); d.getElementById("cAX").checked=(AX.value!="-1");
|
||||||
|
|
||||||
d.getElementById('m0').innerHTML = memu;
|
d.getElementById('m0').innerHTML = memu;
|
||||||
bquot = memu / maxM * 100;
|
bquot = memu / maxM * 100;
|
||||||
d.getElementById('dbar').style.background = `linear-gradient(90deg, ${bquot > 60 ? (bquot > 90 ? "red":"orange"):"#ccc"} 0 ${bquot}%%, #444 ${bquot}%% 100%%)`;
|
d.getElementById('dbar').style.background = `linear-gradient(90deg, ${bquot > 60 ? (bquot > 90 ? "red":"orange"):"#ccc"} 0 ${bquot}%%, #444 ${bquot}%% 100%%)`;
|
||||||
|
@ -42,7 +42,7 @@ function B(){window.history.back()}function U(){document.getElementById("uf").st
|
|||||||
.bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%}#msg{display:none}
|
.bt{background:#333;color:#fff;font-family:Verdana,sans-serif;border:.3ch solid #333;display:inline-block;font-size:20px;margin:8px;margin-top:12px}input[type=file]{font-size:16px}body{font-family:Verdana,sans-serif;text-align:center;background:#222;color:#fff;line-height:200%}#msg{display:none}
|
||||||
</style></head><body><h2>WLED Software Update</h2><form method="POST"
|
</style></head><body><h2>WLED Software Update</h2><form method="POST"
|
||||||
action="/update" id="uf" enctype="multipart/form-data" onsubmit="U()">
|
action="/update" id="uf" enctype="multipart/form-data" onsubmit="U()">
|
||||||
Installed version: 0.12.0-b5<br>Download the latest binary: <a
|
Installed version: 0.12.0-b6<br>Download the latest binary: <a
|
||||||
href="https://github.com/Aircoookie/WLED/releases" target="_blank"><img
|
href="https://github.com/Aircoookie/WLED/releases" target="_blank"><img
|
||||||
src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square">
|
src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square">
|
||||||
</a><br><input type="file" class="bt" name="update" accept=".bin" required><br>
|
</a><br><input type="file" class="bt" name="update" accept=".bin" required><br>
|
||||||
|
File diff suppressed because one or more lines are too long
1398
wled00/html_ui.h
1398
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user