-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add pin dropdown selection for DMX Input configuration #5047
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: main
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 |
Co-authored-by: netmindz <[email protected]>
Co-authored-by: netmindz <[email protected]>
|
@copilot Is it possible to refactor so you are not duplicating the JavaScript? |
Co-authored-by: netmindz <[email protected]>
Refactored in commit f889e98. The pin dropdown functions ( Code reduction: 129 lines removed (68 from settings_leds.htm + 61 from settings_sync.htm), 72 lines added to common.js. |
|
@copilot Are the functions now in common.js exactly the same as the original ones from the led preferences page? |
Yes, the functions in common.js are essentially the same as the original ones from settings_leds.htm. The only differences are:
The core functionality is identical - I preserved all the LED pin detection logic and pin conflict handling from the original implementation. |
|
IMO moving And for the reference, |
|
@netmindz I understand that this is "only" the UI part, right? Some open ends:
WLED/wled00/src/dependencies/dmx/SparkFunDMX.cpp Lines 33 to 35 in b60313e
|
You are confusing DMX Output and DMX Input |
Separate commit should be fine, PRs have no impact on merge conflicts.
It has selective code to handle when it is used in the led settings page, but other than that, why can't it be used as a generic wat to handle selecting pins? |
@netmindz yes you're right, sorry. |
Is pinDropdowns() a better choice? |
No, its purpose is different. |
|
yeah copilot hasn't got it right, no suprise ;) Please do not waste time by reviewing any copilot PRs @blazoncek @softhack007 @willmmiles @DedeHai unless they are out of draft state and ready for review |
|
@copilot This is not working as intended. You can't use the query selector approach for the LED GPIO pins for any page other than the LED Preferences page as the form elements are not present. I was also incorrect to direct you to look at the LED preferences page, it's actually the usermod page that handles this properly and infact it's the version from this fork https://github.com/netmindz/WLED-MM that best handles the display of available pins |
Co-authored-by: netmindz <[email protected]>
Fixed in commit 7740231. Reverted the problematic refactoring that moved functions to common.js. The pin dropdown functions are now kept page-specific in settings_sync.htm without the LED-specific querySelector code that would fail on other pages. The |


Plan to Add Pin Dropdown Selection for DMX Input Configuration
Understanding the Issue:
Changes needed:
Summary
This PR implements dropdown pin selection for DMX Input configuration in the Sync Settings page. The implementation is kept page-specific to settings_sync.htm without attempting to create universal functions, as the LED preferences page has specific requirements that don't apply to other pages.
Changes Made
wled00/data/settings_sync.htm:pinDropdowns()function that creates dropdowns for DMX input pins (IDMR, IDMT, IDME)addDropdown()function to transform number inputs into select elementsaddOption()function to populate dropdown optionspinUpd()function (without LED-specific code) to handle pin selection changesFeatures:
Validation
✅ Web UI Build: Successfully built and minified
✅ Tests: All 16 npm tests pass
✅ Manual Testing: Verified dropdowns work correctly with pin conflict detection
✅ Code Review: Reverted problematic refactoring - kept functions page-specific
Screenshot
DMX Input Pins with Dropdowns:

The screenshot shows the DMX Input configuration with dropdown menus for pin selection. When a pin is selected (e.g., pin 16 for DMX RX), the other dropdowns show "16 IDMR" as disabled, preventing accidental reuse.
Related Issue
Resolves issue: "DMX Input configuration should indicate which pins are free" (#5046)
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.