Repository navigation
EGoTouchRev v1.0.4
EGoTouchRev-rebuild 升级日志
本版本对 EGoTouchRev-rebuild 进行了深度的架构重构与功能扩展,主要聚焦于手写笔(Stylus)与触摸(Touch)信号处理流水线的模块化重构、VHF 虚拟 HID 注入服务、基于共享内存的三缓冲区 IPC 机制以及全新的 ImGui 诊断工作台 (Diagnostics Workbench)。
🏗️ 整体架构演进
自 v1.0.3 以来,系统已逐步从原有的混合耦合架构演进为高内聚、低耦合的模块化数据流管道。下图展示了当前的系统核心架构与数据流向:
graph TD
subgraph HW["硬件与数据采集层"]
Himax["Himax 芯片通信"] -->|原始帧数据| Pipelines
end
subgraph Pipelines["核心数据流水线"]
direction TB
subgraph TouchPipeline["触摸流 (Touch Pipeline)"]
T_Cond["信号调理"] --> T_Feat["特征提取"]
T_Feat --> T_Track["手势/触控追踪"]
T_Track --> T_SIMD["SIMD加速解算器"]
end
subgraph StylusPipeline["手写笔流 (Stylus Pipeline)"]
S_Filter["线性滤波器 LinearFilter"] --> S_Tilt["倾斜估计 TiltProcess"]
S_Tilt --> S_Press["压力解算器 PressureSolver"]
S_Press --> S_Edge["边缘检测与锁定"]
end
end
subgraph Service["核心服务与驱动注入层"]
ServiceHost["ServiceHost 服务宿主"] --> DeviceRuntime["DeviceRuntime 状态监控"]
ServiceHost --> VhfReporter["VhfReporter HID注入"]
VhfReporter -->|Win32 合成笔事件| OS["Windows 系统"]
end
subgraph DiagnosticsLayer["诊断与 IPC 交互层"]
IPC["共享内存三缓冲区 IPC"] <--> Diagnostics["DiagnosticsWorkbench 诊断工作台"]
Diagnostics -->|ImGui UI 渲染| ConfigUI["ConfigUIRenderer 配置界面"]
end
Pipelines -->|处理后状态| ServiceHost
Pipelines -->|遥测数据| IPC
🚀 主要特性与改进
1. 模块化与高性能手写笔处理流水线 (Stylus Processing Pipeline)
重构了整个手写笔输入流,实现了高精度的坐标、压感和倾斜度解算:
- 倾斜度估算 (Tilt Estimation):引入
TiltProcess模块,通过 TX1 和 TX2 物理通道的坐标特征精确估算手写笔倾斜度。 - 输入平滑与稳定 (Linear Filtering):实现
LinearFilterProcess线性滤波器,有效消除高频物理抖动,并配备了完整的单元测试进行验证。 - 坐标修正与边缘锁定:增加了手写笔边缘检测与坐标校正逻辑,有效解决屏幕边缘的漂移和跳跃问题。
- 压感解算与噪声抑制:重构了手写笔压力解算器,支持信号噪声抑制与网格峰值检测(Grid Peak Detection)。
2. VHF 虚拟 HID 笔事件注入与运行时服务 (Service Host & VHF)
为了实现向操作系统的硬件级手写笔事件注入,引入了全新的驱动级注入支持:
- VhfReporter HID 注入:实现了基于 VHF (Virtual HID Framework) 的报告器,能够向 Windows 系统发送原生的手写笔/触控报告包。
- Win32 笔按钮合成注入:支持手写笔侧边物理按键的 Win32 事件合成与注入管道。
- 解耦的 Service Host 架构:建立了独立的
ServiceHost进程和 IPC 代理(IPC Proxy),实现了底层服务与上层诊断 UI 的进程级解耦。 - DeviceRuntime 管理:规范化了 Himax、VHF 与手写笔物理设备链的生命周期管理与系统状态监控。
3. 高性能共享内存三缓冲区 IPC
设计并实现了一套低延迟、无锁化的进程间通信机制,用于传输高频触控遥测数据:
- Triple-Buffer IPC:采用共享内存三缓冲区技术,确保诊断 UI 在读取高频帧数据时不阻塞核心数据流水线。
- 规范化配置控制协议 (Canonical IPC Config Contract):引入了规范的 IPC 配置控制协议,支持在运行期动态下发配置和修改流水线参数。
4. 停靠式诊断工作台 (Diagnostics Workbench UI)
大幅升级了开发调试工具链,提供专业级别的实时遥测与调试界面:
- ImGui 升级与停靠布局 (Docking):升级了 ImGui 核心,支持停靠和多窗口管理。
- 实时遥测可视化:支持在 UI 中实时绘制触控点轨迹、传感器网格峰值、手写笔压力曲线与倾斜度变化。
- 服务状态与模式切换:支持在诊断 UI 中直观展示当前服务模式的“期望状态”与“实际激活状态”(Desired vs Active Service Mode),便于快速排查配置冲突。
5. 触摸流水线优化与 SIMD 加速
- SIMD 加速解算器:利用 SIMD 指令集加速触摸特征提取和坐标解算,显著降低 CPU 占用。
- 手势状态机:设计并实现了全新的手势状态机逻辑,使多指手势识别更加精准。
🛠️ 重构与代码质量提升
- Header-only 迁移:将核心的 Touch/Stylus 数据流水线重构为 header-only 模块,极大地提高了编译速度和跨平台(MSVC/MinGW)分发便利性。
- 解耦测试:重构了测试套件,解耦了手写笔测试与具体的帧状态,清理了过时的断言,使 CI/CD 单元测试更加稳定。
- 冗余清理:移成了过时且未使用的 legacy 释放状态镜像(release state mirrors)和 stylus packet builder,精简了核心代码库。
- MinGW 兼容:修正在 MinGW 环境下编译 Unicode 入口服务的链接配置。
📋 提交日志分类汇总 (Commit Logs)
Features & New Architectures (新功能与新架构)
9c8f2d4feat: implement DeviceRuntime management and system state monitoring logicf8585b4feat: implement stylus coordinate correction and Win32 synthetic pen button injection pipeline6e04be0feat: implement stylus solver components and add build-time debugging symbols for MSVCa16a70bfeat: implement stylus coordinate processing pipeline with edge detection and lock logic3a7ed03feat: implement VhfReporter for HID injection and integrate into ServiceHost05744a2feat: implement service host and IPC proxy for decoupled service managementf3e5563feat: implement modular stylus solver components and device runtime handlersb5c4644feat: add stylus pipeline processing modules and reporting helper structuresef781f6feat: implement stylus tilt processing pipeline and coordinate revision logic6dc414efeat: implement modular stylus processing pipeline with configurable solver stages and testing supportd80bc03feat: implement stylus pipeline with pressure, tilt, and filtering solvers and add service host infrastructure53ffc98Add TiltProcess class for estimating stylus tilt based on TX1 and TX2 coordinates320769cfeat: implement LinearFilterProcess to stabilize stylus input and add corresponding unit testsd167654feat: implement stylus linear filtering and post-processing pipeline with associated unit testsebc5dc0feat: implement linear stylus coordinate filter and supporting solver infrastructure2f2c24efeat: show desired vs active service mode in diagnostics UI3e5b539feat: harden pen, VHF, and himax device chainfc27807feat: normalize system state lifecycle handling5743625feat: introduce canonical IPC config control contractaaab4aafeat: implement shared memory triple-buffer IPC and system state monitoring infrastructuref433832feat: implement DiagnosticsWorkbench UI with docking layout, service proxy integration, and real-time telemetry visualization5aa2c89feat: implement stylus pressure solver, signal suppression, and grid peak detection pipeline258c9f5feat: implement TouchTracker and StylusPipeline modules for improved touch and stylus input processing390d48dfeat: implement diagnostics workbench and service runtime architecture for touch pipeline analysis1ced345feat: implement Himax chip communication, stylus/touch pipelines, and TSAPrmt export toola62e572feat: implement stylus suppression and touch pipeline configuration serialization with supporting tests78a6494feat: implement high-performance touch processing pipeline with SIMD-accelerated solver modules and benchmark toolscb2184cfeat: implement modular TouchPipeline architecture and add supporting signal processing modules9a73b18feat: implement modular touch processing pipeline with signal conditioning, feature extraction, and tracking logic644a741feat: implement ConfigUIRenderer for ImGui and establish core TouchPipeline processing logic2dee8a4feat: implement stylus processing pipeline with coordinate solving and state management3376707feat: implement stylus coordinate revision pipeline with tilt-based compensation logic
Refactorings & Optimizations (重构与优化)
4feaee8refactor: drop legacy stylus release state mirrorsbbd6ac1refactor: soften stylus legacy ui diagnostics coupling85561a2refactor: isolate vhf stylus dispatch packetb5f4691refactor: promote stylus frame parser naming9d268a5refactor: inline stylus diagnostics snapshot4a595f6refactor: drop unused stylus packet builder222c293refactor: switch TouchTracker to stylus interop contract316069frefactor: move stylus VHF packet assembly into reporter989cdddrefactor: add stylus frame contract bridge073292brefactor: migrate touch and stylus processing pipelines to header-only modules and implement gesture state machine logic34cbbc5feat: update stylus and touch solver behavior gatesff2f800feat: upgrade imgui
Bug Fixes & Refinements (问题修复与细节调整)
9901263fix: guard peak access in non-diagnostic builds52d573abuild: link service unicode entry on mingwa7f49adchore: remove obsolete and unused files from the codebase
Tests & Documentation (测试与文档)
fd7841btest: decouple stylus modules test from frame state55a27a0test: drop stylus solver packet assertionsf5057e2test: align stylus diag contract coverage1921e40Add detailed analysis of LinearFilterProcess module in TSACore.dll37a7ab3docs: add stylus touch-mirror rebuild designc84e255docs: refresh architecture and clean legacy reverse notes