feat: USB 入力レポートの純関数デコーダーを追加 - #13
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Closed
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.
概要
USB 入力レポートを
PadStateに変換する純関数を追加しました。DualSense と DualShock 4 を扱います。変更内容
Buttonsをbitflagsで定義し、ボタン、dpad、左スティック、時刻、連番を復号します。CREATEに対応づけました。lib.rsから decoder を公開しました。report_decode.rsが使う外部依存はbitflagsだけです。検証
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo test(9 件成功。DualSense の実機ダンプ 3 件、DualShock 4 の固定値、ボタン同時押し、dpad、異常入力を確認)cargo coupling --check --min-grade=B --max-circular=0 ./src(Grade B、循環 0)DualShock 4 のオフセットは実機で未検証です。DualSense の byte 32 以降もダンプがないため未検証です。
Closes #3