Fix PreOutputProcessor color-output bugs by xDeeKay · Pull Request #34 · TeamAntumbra/wintumbra · GitHub
Skip to content

Fix PreOutputProcessor color-output bugs - #34

Merged
walshie4 merged 2 commits into
TeamAntumbra:masterfrom
xDeeKay:fix/preoutputprocessor-color-bugs
Aug 4, 2026
Merged

Fix PreOutputProcessor color-output bugs#34
walshie4 merged 2 commits into
TeamAntumbra:masterfrom
xDeeKay:fix/preoutputprocessor-color-bugs

Conversation

@xDeeKay

@xDeeKay xDeeKay commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
  • Add missing return after announcing Black for low-brightness colors, which was causing the real (dim) color to be announced again right after, double-firing the color-changed event.
  • Fix operator precedence in avgBias calculation: parenthesize the sum before dividing by 3, so red/green bias are averaged along with blue instead of being added in full.

Testing: Tested with a real Antumbra Glow device connected. Before the fix, dropping to a dark color would flash black and then immediately show the real dim color right after. That double flash is gone now. Also checked the white balance sliders, and the color shift they produce looks correctly balanced instead of leaning too far toward red and green.

- Add missing return after announcing Black for low-brightness colors,
  which was causing the real (dim) color to be announced again right
  after, double-firing the color-changed event.
- Fix operator precedence in avgBias calculation: parenthesize the
  sum before dividing by 3, so red/green bias are averaged along with
  blue instead of being added in full.
- Route the low-brightness Black target through the same weighted-
  averaging step as any other color instead of returning early before
  it. The early return fixed the double-fire but also skipped
  smoothing for every transition into darkness, causing an abrupt
  hard cut to black instead of a smooth fade whenever the sampled
  brightness dropped below the cutoff.
@xDeeKay
xDeeKay force-pushed the fix/preoutputprocessor-color-bugs branch from 23572e8 to b17175e Compare July 30, 2026 14:34
The cdbc29b fix made the black-cutoff branch fall through to weighted
averaging so in-capture transitions stay smooth, but that same branch
is used by every power-off route (quit, power toggle, sleep/lock,
session logoff). With weighting enabled, the off command's black got
blended with the last on-screen color instead of sent as-is, and
since it's the final color before disconnect the device stayed lit.
Set manualMode before sending PowerOffCommand, same as other
immediate-color overrides, to bypass weighting for these.
@walshie4
walshie4 merged commit 4508566 into TeamAntumbra:master Aug 4, 2026
@bs2948659-beep

Copy link
Copy Markdown

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.

3 participants