Skip to content

Commit

Permalink
FastLed Palettes, min/max in UI and effect controls!, LissaJoux
Browse files Browse the repository at this point in the history
General
- initVars optimization, add min and max, readonly default false

index.js
- add min and max values to range and number
- range bugfix init slider values
- add maxlength of text and textarea

appEffects
- support FastLed palettes
- speed -> BPM
- legs, balls slider real values!
- add Lissajoux
- GEQ: rename intensity with ripple

AppModLeds
- reorder UI
- add palette dropdown

SysModFiles
- remove usedBytes and totalBytes from the 1secloop as it caused stutter (only when file change)

SysModSystem
- heap and stack updated only once per 10sec

SysModUI
- initVars: add min and max, readOnly default false
  • Loading branch information
ewowi committed Oct 19, 2023
1 parent 3425526 commit 8abc0bc
Show file tree
Hide file tree
Showing 17 changed files with 1,132 additions and 1,034 deletions.
19 changes: 15 additions & 4 deletions data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,18 @@ function generateHTML(parentNode, json, rowNr = -1) {
} else if (json.type == "range") {
valueNode = cE("input");
valueNode.type = json.type;
valueNode.max = 255;
valueNode.min = json.min?json.min:0;
valueNode.max = json.max?json.max:255; //range slider default 0..255
// valueNode.addEventListener('input', (event) => {console.log(json.type + " input", event);gId(json.id + "_rv").innerText = this.value;});
valueNode.disabled = json.ro;
if (json.value) valueNode.value = json.value;
//numerical ui value changes while draging the slider (oninput)
valueNode.addEventListener('input', (event) => {
gId(json.id + "_rv").innerText = event.target.value;
});
//server value changes after draging the slider (onchange)
valueNode.addEventListener('change', (event) => {
console.log(json.type + " change", event.target, json.id);
gId(json.id + "_rv").innerText = event.target.value;
setInput(event.target);
});
rangeValueNode = cE("span");
Expand All @@ -292,10 +298,15 @@ function generateHTML(parentNode, json, rowNr = -1) {
// buttonCancelNode.addEventListener('click', (event) => {console.log(json.type + " click", event);});
// }
if (json.type == "number") {
valueNode.setAttribute('size', '4');
valueNode.maxlength = 4;
if (json.min) valueNode.min = json.min;
if (json.max) valueNode.max = json.max;
// valueNode.setAttribute('size', '4');
// valueNode.maxlength = 4;
// valueNode.size = 4;
}
else {
if (json.max) valueNode.setAttribute('maxlength', json.max); //for text and textarea set max length valueNode.maxlength is not working for some reason
}
}
} //not checkbox or button or range

Expand Down
8 changes: 4 additions & 4 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

[starmod]
lib_deps =
; https://github.com/me-no-dev/ESPAsyncWebServer.git
; https://github.com/lost-hope/ESPAsyncWebServer.git#master
https://github.com/ewowi/ESPAsyncWebServer.git
; https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
https://github.com/bblanchon/ArduinoJson.git
https://github.com/ewowi/ESPAsyncWebServer.git ;me-no-dev + 64 + queueLength
; https://github.com/ewoudwijma/ESPAsyncWebServer.git ;aircoookie + getClients
; https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 ;optionally combine with aircoookie
; https://github.com/lost-hope/ESPAsyncWebServer.git#master ;artifx on <ip>/edit

[appmod_leds]
build_flags =
Expand Down
Loading

0 comments on commit 8abc0bc

Please sign in to comment.