Skip to content

Commit 7d6f477

Browse files
Copilotnetmindz
andcommitted
Fix HUB75 panel width not loading correctly in settings UI
Co-authored-by: netmindz <[email protected]>
1 parent eb5d548 commit 7d6f477

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

wled00/xml.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,9 @@ void getSettingsJS(byte subPage, Print& settingsScript)
692692
printSetFormValue(settingsScript,PSTR("MPC"),strip.panel.size());
693693
// panels
694694
for (unsigned i=0; i<strip.panel.size(); i++) {
695+
// Set generator fields to match current panel before adding it to ensure correct initial values
696+
printSetFormValue(settingsScript,PSTR("PW"),strip.panel[i].width);
697+
printSetFormValue(settingsScript,PSTR("PH"),strip.panel[i].height);
695698
settingsScript.printf_P(PSTR("addPanel(%d);"), i);
696699
char pO[8] = { '\0' };
697700
snprintf_P(pO, 7, PSTR("P%d"), i); // WLED_WLED_MAX_PANELS is less than 100 so pO will always only be 4 characters or less

0 commit comments

Comments
 (0)