feat(hid): 支持 CH9329 + OTG 组合模式

CH9329 负责键鼠,OTG 提供虚拟媒体、USB 网络和音频;分别配置设备、报告运行状态,并在 OTG 配置变更和回滚时保留未变化的 CH9329 实例。

补齐双设备校验、串口冲突检查、初始化引导和功能入口,修复组合模式下鼠标兼容选项缺失。

验证:独立功能版本的 591 项 Rust 库测试、前端生产构建、3 项引导逻辑测试及 2 组浏览器回归通过。未进行目标 KVM 硬件验证。
This commit is contained in:
mofeng-git
2026-10-26 14:33:38 +08:00
parent b4161f3534
commit f303a8cb2f
30 changed files with 718 additions and 225 deletions

View File

@@ -164,7 +164,7 @@ export const systemApi = {
video_width?: number
video_height?: number
video_fps?: number
hid_backend?: 'otg' | 'ch9329' | 'bluetooth' | 'none'
hid_backend?: 'otg' | 'ch9329' | 'ch9329_otg' | 'bluetooth' | 'none'
hid_bluetooth?: { adapter: string; name: string }
hid_ch9329_port?: string
hid_ch9329_baudrate?: number
@@ -411,6 +411,8 @@ export const hidApi = {
request<{
available: boolean
backend: string
configured_backend: string
otg?: import('@/lib/hidGuide').OtgDeviceStatus
initialized: boolean
online: boolean
supports_absolute_mouse: boolean