-
-
Notifications
You must be signed in to change notification settings - Fork 119
Fix Hub75 options appearing in dynamically added LED outputs #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: mdev
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Call hideHub75() after dynamically adding new LED outputs to ensure Hub75 options are removed when Hub75 support is not compiled in. Co-authored-by: netmindz <442066+netmindz@users.noreply.github.com>
|
there is another PR that seems to do the same which one is correct? or both work? |
Well spotted, this one looks like it should be ok but i've not tested yet |
|
Small test: not working. When re-entering the LEDs settings page, my existing HUB75 config is replaced by this @copilot your change has an unwanted side-effect. On HUB75 enabled builds, the settings page is broken when users arleady have exactly one (supported) HUB75 entry. See screenshot above. |
Only call hideHub75() when Hub75 is actually disabled. Track with window.hub75Hidden flag set when hideHub75() is first called by backend. Co-authored-by: softhack007 <91616163+softhack007@users.noreply.github.com>
Fixed in commit 381208b. The issue was that my initial fix unconditionally called The fix now uses a flag ( Tested both scenarios:
Screenshot showing Hub75 options now available when Hub75 is enabled: |
Confirmed - the existing behavior is fully preserved. The backend still calls My implementation only adds:
This ensures dynamically added outputs match the behavior of the initial page load, while maintaining all existing backend functionality. |
|
@copilot please check if this scenario will work in a build with HUB75 enabled:
The primary purpose of this PR is to always hide the Hub75 entry on builds where HUB75 is disabled. So in case that step3 created too much complication, it would be acceptable that the hub75 option always remains visible in HUB75 builds. |
Verified the scenario works correctly in Hub75-enabled builds: Test results:
How it works:
The primary purpose (hiding Hub75 in non-Hub75 builds) is achieved, and Hub75 options remain fully available in Hub75-enabled builds. |


Fix Hub75 shown in output list incorrectly
Summary
Fixed an issue where Hub75 LED matrix options (values 101-108) were incorrectly displayed in the LED type dropdown for dynamically added outputs when Hub75 support was not compiled in.
Problem
For builds without Hub75 support (
WLED_ENABLE_HUB75MATRIXnot defined), Hub75 options should not appear in the LED type dropdown. This worked correctly for the first output, but Hub75 options were incorrectly included when users added additional outputs by clicking the "+" button.Update: The initial fix broke Hub75-enabled builds by unconditionally removing Hub75 options from all outputs.
Root Cause
The
hideHub75()function removes Hub75 options (values 100-110) from all LED type dropdowns. This function is called during initial page load (fromxml.cppline 554) only when Hub75 is NOT enabled. When users click the "+" button to add new LED outputs, theaddLEDs()function creates new select elements with Hub75 options included in the HTML template, andhideHub75()was never called on these new elements.Solution
Added a global flag
window.hub75Hiddenthat is set totruewhenhideHub75()is first called (by the backend on page load). TheaddLEDs()function now checks this flag before callinghideHub75()on newly added outputs.How it works:
hideHub75()→ setswindow.hub75Hidden = true→ new outputs also get Hub75 options removedhideHub75()→window.hub75Hiddenremains undefined → new outputs keep Hub75 optionsChanges
window.hub75Hidden = trueflag inhideHub75()function (line 20)addLEDs()to conditionally callhideHub75()based on flag (line 468)Testing
✅ Scenario 1 - Hub75 NOT enabled:
hideHub75()on page loadwindow.hub75Hiddenis set totrue✅ Scenario 2 - Hub75 enabled:
hideHub75()window.hub75Hiddenremains undefinedScreenshots
Hub75 disabled - no Hub75 options in dropdown:
Hub75 enabled - Hub75 options available in dropdown:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.