Fix for >10 buttons.

This commit is contained in:
Blaz Kristan
2021-12-08 22:41:16 +01:00
parent 9e6866c160
commit 094bdb29b6
4 changed files with 13 additions and 13 deletions

View File

@@ -349,8 +349,8 @@ ${i+1}:
}
function addBtn(i,p,t) {
var c = gId("btns").innerHTML;
var bt = "BT" + i;
var be = "BE" + i;
var bt = "BT" + String.fromCharCode((i<10?48:55)+i);;
var be = "BE" + String.fromCharCode((i<10?48:55)+i);;
c += `Button ${i} GPIO: <input type="number" min="-1" max="40" name="${bt}" onchange="UI()" class="xs" value="${p}">`;
c += `&nbsp;<select name="${be}">`
c += `<option value="0" ${t==0?"selected":""}>Disabled</option>`;