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
Commit e1a2579
Browse filesBrowse the repository at this point in the historyBrowse files
Make brightness a software colour scale, not a hardware property
display.brightness on the MatrixPortal S3 is not a dimmer. It is effectively
on/off: 0.0 blanks the panel and 0.15 looks identical to 1.0 (confirmed on
hardware -- six live changes, no visible difference). The re-platform had
replaced a working software dimmer with it, so the brightness setting has done
nothing across its whole range for the entire 3.x line, and a stored "0" left a
customer's sign dark for months with a perfectly healthy app behind it.
So the panel is pinned to FULL and colours are scaled on their way out, which
is what the consuming app's own v1/v2 code did before the port. The scale lives
on the display as color_scale, driven from settings at a frame boundary through
the existing dirty-flag handoff. set_color_scale() stores the scale, pins the
hardware and drops the stale paint-index cache together, so those three can
never drift apart -- a display left with a stale scale and an un-pinned panel
would run at full brightness, a worse complaint than a dim one.
Dimming happens at the point of write, from a RAW cached base. Pre-dimming the
base looks cheaper but double-dims CoverAnimator, which builds its overlay
colours from base_colors and passes them through the same _make_overlay that
dims; keeping the base raw also makes PalettePulseAnimator.detach() the same
expression as everywhere else instead of a special case that flashes bright at
the hold->fade handoff.
Covered: draw_text/draw_text_scaled, the set_pixel/fill paint path, the
gradient ramp (with color_scale in the layer cache key, or the scrolling name
would keep its old brightness until the content cycled), all five BitmapText
palette effects (rebuilt on change, so no per-frame cost), the write-once
effect palettes, every icon overlay animator, the pulse, and the three cloned
palettes that SpriteLift/FrameCycle/GravityDrip build.
The riskiest line is dimming BEFORE the `if label.color != color` reuse guard:
dim after it and the stored value never matches the incoming one, so every
glyph bitmap rebuilds every frame -- invisible on desktop, a frame-rate
collapse on the panel. The regression test counts assignments rather than
values, because comparing values passes either way.
1057 tests pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments