Add support for default ledmap.json + peek with ledmap if default panel

Thx to @Troy#2642
This commit is contained in:
Ewoud
2023-02-13 19:09:02 +01:00
parent 0d0f6b5e30
commit 9ba9a61af5
5 changed files with 767 additions and 760 deletions

View File

@@ -1305,10 +1305,12 @@ function drawSegments() {
}
//draw the ledmap
if (ledmapNr>0 && ctx) {
if (ledmapNr>=0 && ctx) { //WLEDMM: @Troy#2642 : include ledmap = 0 as default ledmap
// console.log("Before fetch ledmap ", lastinfo.ledmap);
var fileName;
if (ledmapNr<10)
if (ledmapNr==0)
fileName = "ledmap.json"; //0 is ledmap.json, not ledmap0.json
else if (ledmapNr<10)
fileName = "ledmap"+ledmapNr+".json";
else
fileName = ledmapFileNames[ledmapNr-10];