Repository navigation
左右を同時に長押ししたとき、両方のコントローラーを切る - #18
Merged
Merged
Conversation
切断の処理中に別の手の長押しが成立すると、その切断を捨てていた。 左右を同時に長押しすると同じ拍で左右の長押しが成立するため、 後から評価される側が必ず捨てられ、片方しか切れなかった。 成立した手を保留に積み、前の切断の確認が済んでから続けて切る。 27062 へ送る切断は排他で 1 件ずつに絞り、要求を重ねない。 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WFzzs7T61uYxzrFuFzfHmx
limit7412
marked this pull request as ready for review
November 13, 2026 11:37
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
症状
左右のコントローラーのボタンを同時に長押しすると、予告の振動は左右に出るが、電源が切れるのは片方だけだった。
原因
PowerOff::Usecase#fireは、切断の処理中(@busy)に成立した長押しを捨てていた。主ループの 1 拍の中で、長押しの判定は左、右の順に評価される。左右を同時に押していると、同じ拍で左右の長押しが成立する。左の
fireが@busyを立てた直後に右のfireが呼ばれるため、右は「前の切断を処理中のため今回は切らない」として必ず捨てられていた。予告の振動は
@busyを見ずに出すため左右に出る。これが「最初の振動は両方出る」という見え方と一致する。押すタイミングが数拍ずれていても、左の切断の確認が済むまで(最長で
confirm_timeout_msの 2 倍)に右の長押しが成立すれば、同じく捨てられていた。捨てられた側は解放待ちへ移るため、押し続けても切れない。なお
targetがbothのときは、先に成立した側が左右を対象にするので、この症状は出ない。出るのは既定のpressedのときである。修正
Mutex)で 1 件ずつに絞る。確認が済んでから次を送るので、要求を重ねないという従来の性質は保たれるtargetがbothで左右が成立しても、同じ手を重ねて積まない確認
crystal spec:378 examples, 0 failurescrystal tool format --check src spec scripts、crystal build --no-codegen scripts/preview_dashboard.crも通るGenerated by Claude Code