FX data optimization (#2908)
* Do not require commas between ! in fxdata * Updating fxdata: Halfway through the FX list * fxdata flags and optimizations * Revert optional commas after !
This commit is contained in:
parent
9a44f0c869
commit
1db25d4b20
348
wled00/FX.cpp
348
wled00/FX.cpp
File diff suppressed because it is too large
Load Diff
@ -522,7 +522,7 @@ function loadFXData(callback = null)
|
|||||||
fxdata = json||[];
|
fxdata = json||[];
|
||||||
// add default value for Solid
|
// add default value for Solid
|
||||||
fxdata.shift()
|
fxdata.shift()
|
||||||
fxdata.unshift(";!;0");
|
fxdata.unshift(";!;");
|
||||||
})
|
})
|
||||||
.catch((e)=>{
|
.catch((e)=>{
|
||||||
fxdata = [];
|
fxdata = [];
|
||||||
@ -847,17 +847,18 @@ function populateEffects()
|
|||||||
let fd = "";
|
let fd = "";
|
||||||
if (ef.name.indexOf("RSVD") < 0) {
|
if (ef.name.indexOf("RSVD") < 0) {
|
||||||
if (Array.isArray(fxdata) && fxdata.length>id) {
|
if (Array.isArray(fxdata) && fxdata.length>id) {
|
||||||
if (fxdata[id].length==0) fd = ";;!;1d"
|
if (fxdata[id].length==0) fd = ";;!;1"
|
||||||
else fd = fxdata[id];
|
else fd = fxdata[id];
|
||||||
let eP = (fd == '')?[]:fd.split(";"); // effect parameters
|
let eP = (fd == '')?[]:fd.split(";"); // effect parameters
|
||||||
let p = (eP.length<3 || eP[2]==='')?[]:eP[2].split(","); // palette data
|
let p = (eP.length<3 || eP[2]==='')?[]:eP[2].split(","); // palette data
|
||||||
if (p.length>0 && (p[0] !== "" && !isNumeric(p[0]))) nm += "🎨"; // effects using palette
|
if (p.length>0 && (p[0] !== "" && !isNumeric(p[0]))) nm += "🎨"; // effects using palette
|
||||||
let m = (eP.length<4 || eP[3]==='')?[]:eP[3].split(","); // metadata
|
let m = (eP.length<4 || eP[3]==='')?'1':eP[3]; // flags
|
||||||
if (m.length>0) for (let r of m) {
|
if (id == 0) m = ''; // solid has no flags
|
||||||
if (r.substring(0,2)=="1d") nm += "⋮"; // 1D effects
|
if (m.length>0) {
|
||||||
if (r.substring(0,2)=="2d") nm += "▦"; // 2D effects
|
if (m.includes('1')) nm += "⋮"; // 1D effects
|
||||||
if (r.substring(0,2)=="vo") nm += "♪"; // volume effects
|
if (m.includes('2')) nm += "▦"; // 2D effects
|
||||||
if (r.substring(0,2)=="fr") nm += "♫"; // frequency effects
|
if (m.includes('v')) nm += "♪"; // volume effects
|
||||||
|
if (m.includes('f')) nm += "♫"; // frequency effects
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
html += generateListItemHtml('fx',id,nm,'setFX','',fd);
|
html += generateListItemHtml('fx',id,nm,'setFX','',fd);
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
// Autogenerated from wled00/data/index.htm, do not edit!!
|
// Autogenerated from wled00/data/index.htm, do not edit!!
|
||||||
const uint16_t PAGE_index_L = 30488;
|
const uint16_t PAGE_index_L = 30488;
|
||||||
|
|
||||||
const uint8_t PAGE_index[] PROGMEM = {
|
const uint8_t PAGE_index[] PROGMEM = {
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xd4, 0xbd, 0x69, 0x7a, 0xe3, 0x3a,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0xd4, 0xbd, 0x69, 0x7a, 0xe3, 0x3a,
|
||||||
0xb2, 0x28, 0xf8, 0xdf, 0xab, 0x60, 0x32, 0xab, 0x9c, 0x52, 0x89, 0x96, 0xa8, 0xd1, 0x1a, 0x52,
|
0xb2, 0x28, 0xf8, 0xdf, 0xab, 0x60, 0x32, 0xab, 0x9c, 0x52, 0x89, 0x96, 0xa8, 0xd1, 0x1a, 0x52,
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2211250
|
#define VERSION 2211260
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
|
Loading…
Reference in New Issue
Block a user