mirror of
https://github.com/s00500/ESPUI.git
synced 2025-07-03 19:50:20 +00:00
Compare commits
7 Commits
2.0.2
...
fix_switch
Author | SHA1 | Date | |
---|---|---|---|
4142e37eae
|
|||
0587918621 | |||
48826caee6 | |||
9ab8a84ff0 | |||
d12da60df4 | |||
8cdedaf3cb | |||
02d981cc2b |
@ -104,7 +104,7 @@ function `ESPUI.prepareFileSystem()`
|
||||
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
|
||||
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
|
||||
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
|
||||
|
14
data/js/controls.js
vendored
14
data/js/controls.js
vendored
@ -380,28 +380,28 @@ function start() {
|
||||
data.id +
|
||||
", false)' id='pf" +
|
||||
data.id +
|
||||
"'>▲</a></li>" +
|
||||
"'>▲</a></li>" +
|
||||
"<li><a onmousedown='padclick(RIGHT, " +
|
||||
data.id +
|
||||
", true)' onmouseup='padclick(RIGHT, " +
|
||||
data.id +
|
||||
", false)' id='pr" +
|
||||
data.id +
|
||||
"'>▲</a></li>" +
|
||||
"'>▲</a></li>" +
|
||||
"<li><a onmousedown='padclick(LEFT, " +
|
||||
data.id +
|
||||
", true)' onmouseup='padclick(LEFT, " +
|
||||
data.id +
|
||||
", false)' id='pl" +
|
||||
data.id +
|
||||
"'>▲</a></li>" +
|
||||
"'>▲</a></li>" +
|
||||
"<li><a onmousedown='padclick(DOWN, " +
|
||||
data.id +
|
||||
", true)' onmouseup='padclick(DOWN, " +
|
||||
data.id +
|
||||
", false)' id='pb" +
|
||||
data.id +
|
||||
"'>▲</a></li>" +
|
||||
"'>▲</a></li>" +
|
||||
"</ul>" +
|
||||
(data.type == UI_CPAD
|
||||
? "<a class='confirm' onmousedown='padclick(CENTER," +
|
||||
@ -799,9 +799,11 @@ function start() {
|
||||
websock.onmessage = handleEvent;
|
||||
}
|
||||
|
||||
var sliderCache = {};
|
||||
function sliderchange(number) {
|
||||
var val = $("#sl" + number).val();
|
||||
websock.send("slvalue:" + val + ":" + number);
|
||||
sliderCache[number] !== val && websock.send("slvalue:" + val + ":" + number);
|
||||
sliderCache[number] = val;
|
||||
}
|
||||
|
||||
function numberchange(number) {
|
||||
@ -859,9 +861,11 @@ function switcher(number, state) {
|
||||
if ($("#s" + number).is(":checked")) {
|
||||
websock.send("sactive:" + number);
|
||||
$("#sl" + number).addClass("checked");
|
||||
$("#sl" + number).prop("checked", true);
|
||||
} else {
|
||||
websock.send("sinactive:" + number);
|
||||
$("#sl" + number).removeClass("checked");
|
||||
$("#sl" + number).prop("checked", false);
|
||||
}
|
||||
} else if (state == 1) {
|
||||
$("#sl" + number).addClass("checked");
|
||||
|
251
data/js/controls.min.js
vendored
251
data/js/controls.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user