Segment name for ledmap names

index.js:
- add ledmapFileNames array and fill with lm.segmentname.json names
- use name in dropdowns and in loadmap

fcn_declare and util.cpp: move enumerateLedmaps to FX.h and FX_fcn.cpp
FX_fcn.cpp: deserializemap: use segment name lednames
This commit is contained in:
Ewoud
2023-02-12 11:28:38 +01:00
parent b02192e359
commit 6c52a3d940
9 changed files with 2216 additions and 2167 deletions

View File

@@ -505,15 +505,7 @@ um_data_t* simulateSound(uint8_t simulationId)
}
void enumerateLedmaps() {
ledMaps = 1;
for (size_t i=1; i<10; i++) {
char fileName[16];
sprintf_P(fileName, PSTR("/ledmap%d.json"), i);
bool isFile = WLED_FS.exists(fileName);
if (isFile) ledMaps |= 1 << i;
}
}
//WLEDMM enumerateLedmaps moved to FX_fcn.cpp
//WLEDMM netmindz ar palette
CRGB getCRGBForBand(int x, uint8_t *fftResult, int pal) {