Repository navigation
Description
Context
The R3/R4 power defects measured in #4344 and #4342 have received useful fixes: controller_unscaled_power_mW() now evaluates solved drives on the large-memory tier, and controller_dither_reserve_mW() charges an upward reserve. Those issues are closed. The full contract in docs/color-pipeline-contracts.md still calls for a stable two-pass evaluation across all channels, one wide shared scalar, response/current-field/quantization-aware demand, and a bound on each latched frame. CFastLED::show() still calls an eight-bit mPPowerFunc before controller traversal; calculate_max_brightness_for_power_mW() estimates each controller independently at full scale and maps total demand to a u8 brightness. On smaller tiers the estimator explicitly falls back to source RGB, and TINY omits the reserve. Thus the current fixes do not prove the full managed electrical contract.
Proposal
Implement or explicitly scope a shared managed power prepass that observes stable source/profile snapshots, solves the same emitter contributions the encoder will use, accounts for response inversion and native current/brightness fields, then supplies one wide scalar to encoding without moving dither state. Aggregate managed and legacy channels on the same budget. Specify what can be guaranteed on smaller tiers and below unavoidable idle power; report infeasible budgets.
Acceptance criteria
- Capture focused RED evidence for a mixed legacy/managed multi-channel frame where a source-based or full-scale-linear estimate misses final encoded demand; implement, then make it GREEN. Include dim emitters, nonlinear response (once feat(color): apply per-emitter response LUTs after flux scaling #4497 lands), managed RGBW/RGBWW after feat(color): connect profiled RGBW/RGBWW emitters to managed output #4515 supplies physical white-emitter output and electrical terms (do not count the current legacy fallback as managed coverage), and channel-order invariance.
- Compare the model against the final encoded frame for every dither phase and current-field choice, with stated rounding allowance. Verify one shared limit, sub-eight-bit headroom, and no dither advancement during prepass.
- Test source/profile mutation or rebind across a frame boundary and document stable-input/lifetime requirements. Benchmark prepass plus encode throughput on representative tiers.
- Retain byte-identical unbound output and zero-link footprint when unused. If a tier cannot meet the same bound, expose that limit in its API/docs instead of silently claiming a frame bound.
Decisions
- This issue covers the residual cross-channel architecture, not the already-closed source-drive and dither-reserve bugs (R3: the power limiter charges source RGB, not solved drives — up to 4.45x under-estimate on a managed channel #4344, R4: the power model reads pre-dither pixels, and dither only ever adds — 50% under-report at low brightness #4342).
- Keep the contract's modeled per-latched-frame bound as the target; it does not claim to bound unmodeled internal PWM transients.
- Integrate response inversion after feat(color): apply per-emitter response LUTs after flux scaling #4497, with earlier tests using existing linear profiles.
Related issues
- Meta: color-pipeline review findings burndown (R1–R10, D1) #4156 R3/R4, Color pipeline: final implementation tracker #4034, feat(color): connect profiled RGBW/RGBWW emitters to managed output #4515, R3: the power limiter charges source RGB, not solved drives — up to 4.45x under-estimate on a managed channel #4344, R4: the power model reads pre-dither pixels, and dither only ever adds — 50% under-report at low brightness #4342, Power management doesn't take color/temp correction into account #697 (older correction-aware power request).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Sep 23, 2026
Completed in merged PR #4542. Focused regression tests cover mixed legacy/managed RGB/RGBW/RGBWW final encoded-frame demand, all wide temporal-dither phases, native field choices, channel order, source mutation/rebind, below-idle infeasibility, and byte-identical unbound output. CI passed 24/24 checks. ESP32-S3 unbound Blink is 383,134 B versus master 383,139 B with identical 40,819 B RAM; the baseline was not raised. Host and capture-only ESP32-C6 prepass+encode throughput are recorded on the PR. Hardware photometric accuracy remains P10 #4044, not claimed here.