Skip to content

feat(haptics): transport continuous layers and transient events - #43

Merged
qiin2333 merged 10 commits into
micfrom
codex/authored-ir-v3-protocol
Oct 28, 2026
Merged

qiin2333 merged 10 commits into
micfrom
codex/authored-ir-v3-protocol

Conversation

@qiin2333

@qiin2333 qiin2333 commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

改了啥呀

为客户端打开“持续背景+独立短点”的触觉传输能力:雨滴、脚步、碰撞这类细节可以携带自己的时间和左右力度,交给合适的执行器还原,不用再和背景振动糊成一团啦~

  • 持续层提供左右两路低/高频状态;短点提供事件 ID、起音时间和左右强度,配合源时钟与 epoch 表达重启、静音释放和结束。
  • 同一条消息、一次回调交付基础特征与分层信息,接收端获得一致的控制器身份、序号和源时间。近期事件可重复携带,客户端据此去重、恢复尚未播放的事件并丢弃过期事件。
  • 新能力由会话协商启用,给普通振动手柄、机身线性马达和其他客户端后端提供共同的设备无关输入。

职责与兼容性

  • common-c 维护能力协商、解码、字段校验和同步回调;SDK 负责信号分析,Sunshine 负责编码发送,客户端负责播放时钟、去重、期限与执行器分配。
  • 沿用现有 IR 控制消息 0x550B。原 v2 的 72-byte 基础帧及字段语义保持不变;旧客户端仍接收原格式,新客户端连接旧主机可使用基础 IR;原始触觉 PCM 与 IR 按已有约定互斥选择。
  • 分层信息通过可协商的增强能力交付,每包最多 8 个事件、最大 264 byte。分析诊断分数与设备预设不进入传输契约。
  • 回调在控制接收线程同步执行,异步处理前须复制借用数据。应用与 common-c 的头文件/库需配套重编译;网络兼容性与共享库二进制 ABI 是不同的保证。

验证

  • 静态库构建与 16/16 CTest 通过。
  • 覆盖能力组合、旧格式回退、分层字段、事件数量、消息尺寸、版本、源时间和有限数值校验。
  • Sunshine 适配测试验证不同 PCM 分块下基础特征保持一致,增强信息可由生产解析器读取。

配套实现

@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 53e65614-0e4d-4f41-955c-7940c79da9b0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qiin2333 qiin2333 changed the title feat(haptics): negotiate authored IR v3 with v2 fallback feat(haptics): extend IR v2 with continuous state and events Oct 28, 2026
@qiin2333
qiin2333 merged commit f38adbb into mic Oct 28, 2026
19 checks passed
@qiin2333
qiin2333 deleted the codex/authored-ir-v3-protocol branch October 28, 2026 15:42
@qiin2333 qiin2333 changed the title feat(haptics): extend IR v2 with continuous state and events feat(haptics): transport continuous layers and transient events Oct 30, 2026
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.

1 participant