Skip to content

wheel maxBrightness fix in Ws28xxController.cpp - #100

Open
jwidess wants to merge 2 commits into
thankthemaker:masterfrom
jwidess:ws28xx-fixes
Open

wheel maxBrightness fix in Ws28xxController.cpp#100
jwidess wants to merge 2 commits into
thankthemaker:masterfrom
jwidess:ws28xx-fixes

Conversation

@jwidess

@jwidess jwidess commented Mar 24, 2026

Copy link
Copy Markdown

Rainbow preset didn't have maxBrightness factor applied, fixed. The main change is to compute the RGB values and then scale them according to the maxBrightness setting before returning the color.

jwidess added 2 commits March 23, 2026 21:18
Rainbow preset didn't have maxBrightness factor applied, fixed.
AI Summary: Refactor Ws28xxController::wheel(byte) to compute red/green/blue into variables rather than returning early, then scale each channel by a constrained maxBrightness (0..255) using 16-bit intermediate math and return the adjusted Color. This ensures the generated wheel colors respect the controller's global brightness setting and avoids duplicated return paths.
Bumped SOFTWARE_VERSION_PATCH from 7 to 8 in config.h for this wheel fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant