1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-07-04 01:00:19 +00:00

7 Commits

Author SHA1 Message Date
4142e37eae Attempt fixing switcher inconsistent state
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
2021-06-14 15:06:08 +02:00
0587918621 Merge pull request #109 from A-damW/master
Update README.md
2021-02-06 09:42:08 +01:00
48826caee6 Merge pull request #114 from tecteun/master
slider sends (browser dependent) lots of events, throttle using only …
2021-02-06 09:41:26 +01:00
9ab8a84ff0 slider sends (browser dependent) lots of events, throttle using only unique values. 2021-02-05 22:03:02 +00:00
d12da60df4 Update README.md
Minor typo, line 107, "to to" > "to do"
2021-01-10 08:20:16 +00:00
8cdedaf3cb Merge pull request #106 from marcusmiess/master-fix-pad-arrows
Fix for pad arrows
2021-01-02 10:10:54 +01:00
02d981cc2b Changed the ascii arrow to the HTML equivalent. Fixes the problem, where the pad arrow strings got broken. 2021-01-02 00:23:13 +01:00
4 changed files with 511 additions and 9 deletions

View File

@ -104,7 +104,7 @@ function `ESPUI.prepareFileSystem()`
Just open the example sketch **prepareFileSystem** and run it on the ESP, (give Just open the example sketch **prepareFileSystem** and run it on the ESP, (give
it up to 30 seconds, you can see the status on the Serial Monitor), The library it up to 30 seconds, you can see the status on the Serial Monitor), The library
will create all needed files. Congratulations, you are done, from now on you will create all needed files. Congratulations, you are done, from now on you
just need to to this again when there is a library update, or when you want to just need to do this again when there is a library update, or when you want to
use another chip :-) Now you can upload your normal sketch, when you do not call use another chip :-) Now you can upload your normal sketch, when you do not call
the `ESPUI.prepareFileSystem()` function the compiler will strip out all the the `ESPUI.prepareFileSystem()` function the compiler will strip out all the
unnecessary strings that are already saved in the chip's filesystem and you have unnecessary strings that are already saved in the chip's filesystem and you have

14
data/js/controls.js vendored
View File

@ -380,28 +380,28 @@ function start() {
data.id + data.id +
", false)' id='pf" + ", false)' id='pf" +
data.id + data.id +
"'></a></li>" + "'>&#9650;</a></li>" +
"<li><a onmousedown='padclick(RIGHT, " + "<li><a onmousedown='padclick(RIGHT, " +
data.id + data.id +
", true)' onmouseup='padclick(RIGHT, " + ", true)' onmouseup='padclick(RIGHT, " +
data.id + data.id +
", false)' id='pr" + ", false)' id='pr" +
data.id + data.id +
"'></a></li>" + "'>&#9650;</a></li>" +
"<li><a onmousedown='padclick(LEFT, " + "<li><a onmousedown='padclick(LEFT, " +
data.id + data.id +
", true)' onmouseup='padclick(LEFT, " + ", true)' onmouseup='padclick(LEFT, " +
data.id + data.id +
", false)' id='pl" + ", false)' id='pl" +
data.id + data.id +
"'></a></li>" + "'>&#9650;</a></li>" +
"<li><a onmousedown='padclick(DOWN, " + "<li><a onmousedown='padclick(DOWN, " +
data.id + data.id +
", true)' onmouseup='padclick(DOWN, " + ", true)' onmouseup='padclick(DOWN, " +
data.id + data.id +
", false)' id='pb" + ", false)' id='pb" +
data.id + data.id +
"'></a></li>" + "'>&#9650;</a></li>" +
"</ul>" + "</ul>" +
(data.type == UI_CPAD (data.type == UI_CPAD
? "<a class='confirm' onmousedown='padclick(CENTER," + ? "<a class='confirm' onmousedown='padclick(CENTER," +
@ -799,9 +799,11 @@ function start() {
websock.onmessage = handleEvent; websock.onmessage = handleEvent;
} }
var sliderCache = {};
function sliderchange(number) { function sliderchange(number) {
var val = $("#sl" + number).val(); var val = $("#sl" + number).val();
websock.send("slvalue:" + val + ":" + number); sliderCache[number] !== val && websock.send("slvalue:" + val + ":" + number);
sliderCache[number] = val;
} }
function numberchange(number) { function numberchange(number) {
@ -859,9 +861,11 @@ function switcher(number, state) {
if ($("#s" + number).is(":checked")) { if ($("#s" + number).is(":checked")) {
websock.send("sactive:" + number); websock.send("sactive:" + number);
$("#sl" + number).addClass("checked"); $("#sl" + number).addClass("checked");
$("#sl" + number).prop("checked", true);
} else { } else {
websock.send("sinactive:" + number); websock.send("sinactive:" + number);
$("#sl" + number).removeClass("checked"); $("#sl" + number).removeClass("checked");
$("#sl" + number).prop("checked", false);
} }
} else if (state == 1) { } else if (state == 1) {
$("#sl" + number).addClass("checked"); $("#sl" + number).addClass("checked");

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long