Skip to content

fix: use discrete palette value steps - #86

Merged
zhouxiyu1997 merged 1 commit into
mainfrom
codex/fix-issue-81-discrete-palette-value
Jul 27, 2026
Merged

fix: use discrete palette value steps#86
zhouxiyu1997 merged 1 commit into
mainfrom
codex/fix-issue-81-discrete-palette-value

Conversation

@Woodii1998

Copy link
Copy Markdown
Collaborator

Stack

This PR is intentionally based on #85 so its timeout-estimator tests use the same 90-second PC ACK policy. After #85 merges, this PR can be retargeted to main without carrying unrelated changes.

Summary

  • replace the custom-palette value-axis analog hold with one DpadDown press per value step
  • remove the coarse/fine value split and its unused constants
  • make the desktop raw duration estimator count the same discrete actions
  • keep the PC <slot> #RRGGBB protocol, preview quantization, and saturation movement unchanged

Root cause

The preview assumed a linear 112-step value scale, but firmware represented all except the last 12 steps as one full-stick hold. The game accelerates continuous stick movement, so dark colors overshot their target and became darker than the preview. Discrete presses use the same one-step behavior already used for the final dark-value corrections.

Trade-off

Dark custom colors take longer. At the default 100/100ms input timing, pure black's value phase grows from 4.5s to 22.4s. The desktop estimator is updated by the same amount, and #85's 90-second ACK floor covers the resulting command duration.

Validation

  • TDD RED: firmware analog-path assertion and old timing values failed before implementation
  • npm run ci:local:quick — desktop 100/100, flasher 8/8, type checks and web build passed
  • PlatformIO builds — Switch, Switch 2, and Switch Lite all succeeded
  • task and final reviews found no blocking findings

Physical console verification of dark shades remains recommended because CI cannot read the in-game palette cursor.

Fixes #81

@zhouxiyu1997
zhouxiyu1997 force-pushed the codex/fix-issue-81-discrete-palette-value branch from 794e2f5 to b8c5b3f Compare July 27, 2026 11:50
@zhouxiyu1997
zhouxiyu1997 changed the base branch from codex/fix-issue-74-palette-timeout to main July 27, 2026 11:50
@zhouxiyu1997
zhouxiyu1997 marked this pull request as ready for review July 27, 2026 11:50
@zhouxiyu1997
zhouxiyu1997 force-pushed the codex/fix-issue-81-discrete-palette-value branch from b8c5b3f to c0b1a62 Compare July 27, 2026 11:51
@zhouxiyu1997
zhouxiyu1997 merged commit bf5aa7a into main Jul 27, 2026
3 checks passed
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.

自定义多色绘制深色色块时,绘制图与预览图不一致

2 participants