feat: 添加 GPIO 电平检测触发亮屏/息屏
新增 GPIOEventDetector 后台线程,以 50ms 间隔轮询 GPIO 引脚。 检测到电平变化时唤醒屏幕并启动 60 秒倒计时,到期无新变化则息屏。 - 添加 GPIOEventDetector 类,支持 RPi.GPIO 硬读取和 Mock 回退 - 集成到 PadSleepApp 主循环,GPIO 触发优先级高于定时亮屏时段 - TUI 状态面板新增 GPIO 行,显示引脚号和倒计时 - 支持通过配置文件调整引脚号(gpio_pin)和倒计时长度 - install.sh 修复:补装 rpi-lgpio 依赖 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
da8ad4d17d
commit
9940db451f
+4
-1
@@ -7,5 +7,8 @@
|
||||
"check_interval_seconds": 30,
|
||||
"auto_sleep_delay_minutes": 1,
|
||||
"adb_device_serial": "",
|
||||
"adb_path": "adb"
|
||||
"adb_path": "adb",
|
||||
"gpio_enabled": true,
|
||||
"gpio_pin": 17,
|
||||
"gpio_countdown_seconds": 60
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user