Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 23, 2025

Addresses feedback on PR #8 regarding undocumented magic numbers for haptic timing parameters.

Changes

  • UPDATE_INTERVAL_MS (8ms): Documents reduction from 10ms → 8ms (100 Hz → 125 Hz) for improved temporal resolution in fast-changing haptic effects (vibration, pain pulses)

  • SUBMISSION_DURATION_MS (100ms): Documents increase from 40ms → 100ms to maintain 12.5x frame overlap, preventing perceptible gaps while balancing responsiveness to rapid intensity changes

// Worker thread update rate: 8ms = 125 Hz
// Reduced from 10ms (100 Hz) to 8ms for smoother haptic feedback and better temporal resolution.
// Higher update rates provide more responsive haptic effects, particularly for fast-changing
// sensations like vibration and pain pulses.
private const int UPDATE_INTERVAL_MS = 8;

// Haptic frame duration: how long each submitted frame persists on the device
// Increased from 40ms to 100ms to ensure smooth overlap between frames and prevent gaps.
// The 100ms duration (with 8ms updates) provides ~12.5x frame overlap, creating seamless
// haptic transitions. Too short a duration can cause perceptible stuttering or dropouts,
// while too long can reduce responsiveness to rapid intensity changes.
private const int SUBMISSION_DURATION_MS = 100;

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 23, 2025 03:40
Co-authored-by: nalathethird <36301692+nalathethird@users.noreply.github.com>
Co-authored-by: nalathethird <36301692+nalathethird@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP to address feedback on bHapticsManager architecture Document haptic timing constants with rationale and performance tradeoffs Nov 23, 2025
Copilot AI requested a review from nalathethird November 23, 2025 03:44
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