Skip to content

feat: add calibrated input timeline - #14

Merged
torabit merged 1 commit into
mainfrom
torabit/feat/timeline
Sep 27, 2026
Merged

torabit merged 1 commit into
mainfrom
torabit/feat/timeline

Conversation

@torabit

@torabit torabit commented Sep 27, 2026

Copy link
Copy Markdown
Owner

概要

  • src/timeline.rs に時刻校正、wrap 解決、入力イベント化を追加した。
  • DualSense と DualShock 4 のデバイス時刻をホスト時刻で校正し、複数回の wrap を解決する。
  • ボタン、十字キー、左スティックの変化をイベントに変換し、連番の欠落を記録する。

実装上の判断

  • 最初のレポートは状態と時刻の基準に使い、イベントを出さない。
  • 校正後のスケールは次のレポートから使い、過去の時刻には遡って適用しない。
  • スティックの Y 軸は上向きに正規化する。方向の切り替えは新しい方向の中心から指定角度以内で行う。

検証

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test(35 件成功)
  • cargo coupling --check --min-grade=B --max-circular=0 ./src(Grade B、循環 0)

Closes #4

PadState の列を InputEvent の列に変換する timeline モジュールを追加する。
デバイス時刻を一次に使い、ホストの QPC は wrap 回数の解消とスケール校正にだけ使う。
取りこぼしは補間せず、直後のイベントに gap_before を立てて下流に伝える。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@torabit torabit mentioned this pull request Sep 27, 2026
@torabit
torabit merged commit 11a031f into main Sep 27, 2026
1 check 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.

timeline

2 participants