Skip to content

test(power): pin that the limiter charges the source, not the solved drives (#4344) - #4392

Merged
zackees merged 1 commit into
masterfrom
test/4344-limiter-charges-source
Sep 12, 2026
Merged

zackees merged 1 commit into
masterfrom
test/4344-limiter-charges-source

Conversation

@zackees

@zackees zackees commented Sep 12, 2026

Copy link
Copy Markdown
Member

Pins the exposure #4344 measured. Does not close it — the fix (the two-pass prepass the contract describes) is unimplemented.

Measured

200-LED strip, source (40,40,40), sRGB primaries on both sides so emitter luminance is the only thing separating charged from drawn:

emitter luminance charged drawn ratio
1.00 7561 2983 0.395
0.25 7561 8726 1.154
0.10 7561 18230 2.411

Close to #4344's own figures — 0.36, 1.17, 2.47 on a single LED — with the difference being the idle term across 200 of them. (Unlike #4342, where I could not reproduce the headline and said so; this one replicates.)

What is asserted

The issue's framing rather than the headline number, because it is the more useful claim: not "the model is wrong by 2.4x" but that the sign and magnitude are set by emitter luminance relative to the rendering white — a property of the bound profile the limiter never reads.

  • brighter emitters need less drive than the source asks for → the estimate is conservative (wasteful, safe);
  • dimmer ones need more → it is optimistic, which is the direction that matters for a budget;
  • the crossing sits between 1.00 and 0.10, so the same estimate is safe for one device and unsafe for another with identical primaries and an identical source.

That last one is the property worth guarding: it cannot be fixed by adjusting a margin, only by reading the profile.

Verification

Making the device ignore its luminance fails five assertions.

Worth recording: my first attempt at that mutation changed only lum_r and passed. A grey source spreads across all three emitters, so moving one is not enough — a weak mutation that would have left me believing the test had teeth it did not.

bash lint clean; 305/305 unit, 84/84 examples.

Test-only; no src/ change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9

…drives (#4344)

`CFastLED::show()` powers the raw CRGB array before any controller traversal;
the managed transform runs later, inside `showPixels`. The two numbers are
about different pixels, and nothing guarded the difference.

Measured over a 200-LED strip at source (40,40,40), sRGB primaries on both
sides so emitter luminance is the only thing separating them:

    emitter luminance   charged   drawn    ratio
                 1.00      7561    2983    0.395
                 0.25      7561    8726    1.154
                 0.10      7561   18230    2.411

Close to the figures in #4344 -- 0.36, 1.17, 2.47 on a single LED -- with the
difference being the idle term across 200 of them.

What the cases assert is the issue's own framing, which is the more useful
claim: not "the model is wrong by 2.4x" but that the sign and magnitude are
set by emitter luminance relative to the rendering white, a property of the
bound profile the limiter never reads. Brighter emitters need less drive than
the source asks for and the estimate is conservative; dimmer ones need more
and it is optimistic. The crossing sits between 1.00 and 0.10, so the same
estimate is safe for one device and unsafe for another with identical
primaries and an identical source.

Verified by making the device ignore its luminance, which fails five
assertions. Worth noting the first attempt at that mutation changed only
`lum_r` and passed -- a grey source spreads across all three emitters, so one
channel is not enough to move the result.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
@zackees
zackees merged commit 83ab204 into master Sep 12, 2026
4 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Sep 12, 2026
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Sep 12, 2026
@zackees
zackees deleted the test/4344-limiter-charges-source branch November 5, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant