You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
APA102/SK9822 FASTLED_USE_GLOBAL_BRIGHTNESS: field from pixel 0 dims the rest of the strip; unreviewed on managed channels #4457
Found while writing P8's encoder table (#4445, docs/color-pipeline-contracts.md → "Encoder table").
With FASTLED_USE_GLOBAL_BRIGHTNESS=1 (off by default), APA102/SK9822 (non-HD) encode through encodeAPA102_AutoBrightness / encodeSK9822_AutoBrightness:
They derive one strip-wide 5-bit field from the first pixel's peak.
They rescale only that pixel's codes to it.
Every other pixel keeps its codes under the reduced field, so it is dimmed by field/31.
The legacy APA102Controller does the same for pixels 2..n: getGlobalBrightnessAndScalingFactors, commented "This function is pure magic."
It also runs on colour-managed channels. There it re-derives a field from drives the pipeline already solved. The encoder table names this as the one exception to "no second shaping stage after the device solve" (§6).
Decide
Is the first-pixel-only rescale intended? It dims the rest of the strip by a factor chosen from pixel 0.
On a managed channel, should this mode hold the field fixed (B1's conservative treatment) instead?
Not in scope of P8
P8's criteria are met without it. This is a pre-existing legacy behaviour, and changing it changes output for every sketch that sets the flag.
Activity
fix(color): managed non-HD APA102/SK9822 hold the field at 31 under g…