fix: 注册DevicePlugin到main.rs — 修复防息屏/光标功能失效(P0)

ScreenPlugin重构为thin wrapper后main.rs未注册DevicePlugin,
导致DeviceCommand消息无接收者。现在DevicePlugin在Screen之前注册。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
showen
2026-03-13 12:42:51 +08:00
parent 3729addb71
commit 29645d711d
3 changed files with 48 additions and 2 deletions

View File

@@ -69,3 +69,13 @@
- cargo check --workspace --all-targets 零 warning
- cargo test --workspace 全部通过73 个测试)
- 为 Task 2LinuxArm64Backend 实现)铺平道路
## 个人经验 (2026-03-13 - DevicePlugin 注册到 main.rs)
- 修复 P0 问题ScreenPlugin 重构为 DevicePlugin 的 thin wrapper 后main.rs 未注册 DevicePlugin
- 在 src/main.rs 顶部 use 中添加 DevicePlugin 导入
- 在 ScreenPlugin 之前注册 DevicePlugin因为 Screen 依赖 Device
- 使用 DevicePlugin::new_default() 创建实例(自动选择平台 Backend
- 更新注册顺序注释device, screen, wifi, video, ble独立插件+ http依赖 video
- cargo check --workspace --all-targets 通过
- cargo test --workspace 全部通过77 个测试)
- 防息屏和光标隐藏功能现已在运行时生效