Repository navigation
Conversation
Fixes the gap described in wled#5723 for the M-1: only RGB and BGR were applied, the other four orders were silent no-ops, the LED settings page hid the Color Order select for HUB75, and BusHub75Matrix never reported its order so a config save always wrote RGB. - Every order is applied by permuting the driver's r/g/b GPIO roles once before the driver is created (same mechanism as the old BGR case): no per-pixel cost, covers the buffered and direct-draw paths. Order meaning matches PolyBus and WLED-MM wled#349: "RBG" fixes a panel whose G and B inputs are swapped. - Backward compatible: a stored 0 (WLED's GRB default, and what the M-1 factory cfg.json ships) has always meant no swap on HUB75 and still does; a real red/green swap on HUB75 uses the new value 6. Stored 1 (any saved config) and BGR (4) produce exactly the same pins as before. - BusHub75Matrix::getColorOrder() returns the order, so cfg.json and the settings page keep it. - Settings: Color Order shown for HUB75 with RGB, BRG, RBG, BGR, GBR, GRB. - apollo/hub75-color-order-test.js (npm test) checks the table and normalisation read from the C++ source. Credits: troyhacks (MoonModules#349), softhack007 (pin-swap suggestion in that review), jsenecal (analysis in wled#5723). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd back GRB is value 0 on strips but 6 on HUB75 (where a stored 0 is the legacy no-swap RGB). The page now remembers the value a conversion replaced, so WS281x GRB -> HUB75 -> WS281x stays GRB and HUB75 GRB -> strip -> HUB75 stays GRB; a manual choice clears the memory. Found in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds all six HUB75 color orders to the M-1 firmware, so a panel with swapped color lines (the customer's green/blue panel needs RBG) can be fixed from Config > LED & Hardware. Same gap as wled#5723 (nothing is posted upstream).
What was wrong (b8 / upstream 16.0.1)
BusHub75Matrixdid not report its order, so any config save wrote RGB back.What this does
cfg.jsonstores"order":0and any saved config stores 1; both have always meant "no swap" on HUB75 and still do. Real GRB on HUB75 uses a new HUB75-only value 6. BGR (4) gives exactly the old pins.getColorOrder()override, so the choice survives save and reboot.Verified (no hardware)
apollo/hub75-color-order-test.js(runs innpm test): reads the table and the 0-is-RGB rule straight from the C++ and checks permutations, unchanged pins for stored 0/1/7-15, BGR = old swap, agreement with PolyBus and WLED-MM Effect Request: Random Pixel Strobe "Overlay" wled/WLED#349 on both panel halves. Five deliberate mutations of the C++ are all caught.npm test: 24/24.apollo_m1(+224 bytes vs b8),esp32s3dev_16MB_opi_hub75,esp32dev(non-HUB75, helpers compile out): all succeed, no new warnings.Bench check before merging (about 2 minutes per order)
{"seg":[{"fx":0,"col":[[255,0,0]]}]}); top and bottom halves must match.On a standard panel: RGB = red/green/blue; RBG = red/blue/green; BGR = blue/green/red; GRB = green/red/blue; BRG = green/blue/red; GBR = blue/red/green.
/cfg.jsonshows"order":0) without touching settings; colors must be unchanged and the page shows RGB.Notes
Credits: troyhacks (MoonModules#349, order semantics and UI idea), softhack007 (pin-swap suggestion in that review), jsenecal (analysis in wled#5723). All EUPL-1.2; no code copied.
🤖 Generated with Claude Code