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:
@@ -69,3 +69,13 @@
|
||||
- cargo check --workspace --all-targets 零 warning
|
||||
- cargo test --workspace 全部通过(73 个测试)
|
||||
- 为 Task 2(LinuxArm64Backend 实现)铺平道路
|
||||
|
||||
## 个人经验 (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 个测试)
|
||||
- 防息屏和光标隐藏功能现已在运行时生效
|
||||
|
||||
Reference in New Issue
Block a user