Give HUB75 Color Order Overrides#349
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughBusHub75Matrix now stores and exposes a per-instance color order and applies per-pixel RGB remapping when drawing to HUB75 panels. The LED settings UI was changed to show Color Order controls for HUB75 types and to set the per-output Color Order field for those types when LED type changes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@wled00/data/settings_leds.htm`:
- Line 226: The color-order selector (CO) created in addLEDs() still defaults to
"GRB", so when you unhide CO via gId("co"+n).style.display for a HUB75 bus the
control remains set to GRB and will save incorrectly; update the logic so when
the bus type is HUB75 (the same condition that unhides CO in the code using
gId("co"+n)) you programmatically set the selector's value to the correct
default (e.g., "RGB") or derive its default from the bus type instead of leaving
it as the old GRB default; modify addLEDs() (or the code path that shows CO via
gId("co"+n)) to set gId("co"+n).value appropriately whenever the selector is
made visible for HUB75.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d2615b08-8f58-4b9d-a91d-81fbf0d3d7df
📒 Files selected for processing (3)
wled00/bus_manager.cppwled00/bus_manager.hwled00/data/settings_leds.htm
|
Hi @troyhacks, actually this is a very inefficient method to do color ordering on HUB75. |
|
Yeah, that was my thought too (and my usual method) - but this GTJD. I didn't want to mess with re-initing the panel at the moment. Both ideas may be valid? This is the quick way to get things correct, and then on reboot it could be done via pin swapping. |
actually yes, both ideas are working. There is even a third way, by re-ordering RGB in setPixelColor, and reversing that in getPixelColor. My concern is that the "hot path" of pushing pixels down to the driver should stay clear of any extra logic - we have less than 8ms for pushing the complete framebuffer, as we need to be faster than the "video scan beam" to avoid tearing. I have an idea already - maybe we can still have both. |
Not all HUB75 panels are RGB.
This just enables the standard color order stuff we already have in the bus system for HUB75 too.
Summary by CodeRabbit
Bug Fixes
New Features