From 7ef184223764887f927248bedfbbbb7241d4decf Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 3 Jan 2023 15:16:45 +0100 Subject: [PATCH] comments updated see discussion in https://github.com/Aircoookie/WLED/commit/faf616cbea4bbe6b72bed64e129c07450634b728 --- wled00/set.cpp | 6 +++--- wled00/xml.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wled00/set.cpp b/wled00/set.cpp index 664d008b..40301a49 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -656,11 +656,11 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) for (uint8_t i=0; ihasArg(pO)) break; // softhack007: this line looks suspicious to me .. break() aborts the loop .. maybe you need continue()? + // create P0B, P1B, ..., P63B, etc for other PxxX + pO[l] = 'B'; if (!request->hasArg(pO)) break; pO[l] = 'B'; p.bottomStart = request->arg(pO).toInt(); pO[l] = 'R'; p.rightStart = request->arg(pO).toInt(); pO[l] = 'V'; p.vertical = request->arg(pO).toInt(); diff --git a/wled00/xml.cpp b/wled00/xml.cpp index 60473658..80d9e4a8 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -745,10 +745,10 @@ void getSettingsJS(byte subPage, char* dest) oappend(itoa(i,n,10)); oappend(SET_F(");")); char pO[8] = { '\0' }; - snprintf_P(pO, 7, PSTR("P%d"), i); + snprintf_P(pO, 7, PSTR("P%d"), i); // MAX_PANELS is 64 so pO will always only be 4 characters or less pO[7] = '\0'; uint8_t l = strlen(pO); - // softhack007: please check if the code below is correct. The first element is pO[0], so maybe you want to modify pO[l-1]? + // create P0B, P1B, ..., P63B, etc for other PxxX pO[l] = 'B'; sappend('v',pO,strip.panel[i].bottomStart); pO[l] = 'R'; sappend('v',pO,strip.panel[i].rightStart); pO[l] = 'V'; sappend('v',pO,strip.panel[i].vertical);