Fix Art-Net DMX channel limitation: support full 512 channels per universe#1983
Fix Art-Net DMX channel limitation: support full 512 channels per universe#1983
Conversation
|
Hello @copilot 👋 I'm the Hyperion Project Bot and I want to thank you for To help you and other users test your pull requests faster, 🔗 https://github.com/hyperion-project/hyperion.ng/actions/runs/22155635218 Of course, if you make changes to your PR, I will create a new link. Best regards, |
- Changed loop to iterate over LEDs (ledValues.size()) instead of RGB bytes (_ledRGBCount) - Explicitly write R, G, B for each LED using rawdata[ledIdx * 3 + 0/1/2] - Fixed return value handling to properly report errors - Removed unnecessary qMin() in size calculation - This fixes the limitation that prevented transmission beyond 108 DMX channels (36 RGB LEDs) Co-authored-by: Lord-Grey <48840279+Lord-Grey@users.noreply.github.com>
|
Hey @copilot I created a new link to your workflow artifacts: |
- Check buffer boundaries before writing to prevent overflow - Move packet boundary check before LED data write - Add validation for channelsPerFixture (minimum 3) - Add minimum constraint to schema - Send final packet after loop completes Co-authored-by: Lord-Grey <48840279+Lord-Grey@users.noreply.github.com>
|
Hey @copilot I created a new link to your workflow artifacts: |
Co-authored-by: Lord-Grey <48840279+Lord-Grey@users.noreply.github.com>
|
Hey @copilot I created a new link to your workflow artifacts: |
|
Hey @copilot I created a new link to your workflow artifacts: |
|
Hey @Copilot I created a new link to your workflow artifacts: |
|
Hey @copilot I created a new link to your workflow artifacts: |
Problem
Art-Net device limited to 108 DMX channels (36 RGB LEDs) instead of 512 channels (170 RGB LEDs). Root cause:
write()function iterated over_ledRGBCount(byte count = LEDs × 3) while treating loop index as LED count, terminating after 108 bytes.Buggy code:
Changes
Core fix
for (ledIdx = 0; ledIdx < ledValues.size(); ledIdx++)rawdata[ledIdx * 3 + 0/1/2]instead of sequential byte iterationBuffer safety
if (dmxIdx + _artnet_channelsPerFixture > DMX_MAX)Error handling
if (writeBytes(...) < 0) retVal = -1retVal &= writeBytes(...)withretVal = 0always returned 0Validation
_artnet_channelsPerFixture >= 3"minimum": 3forchannelsPerFixtureFixed code:
Impact
Enables full 512-channel DMX transmission per universe, supporting ~170 RGB LEDs vs. previous 36 LED limitation.
Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.