新增 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>
15 lines
344 B
JSON
15 lines
344 B
JSON
{
|
|
"screen_on_periods": [
|
|
{ "start": "06:40", "end": "7:30" },
|
|
{ "start": "19:00", "end": "19:05" },
|
|
{ "start": "23:00", "end": "23:05" }
|
|
],
|
|
"check_interval_seconds": 30,
|
|
"auto_sleep_delay_minutes": 1,
|
|
"adb_device_serial": "",
|
|
"adb_path": "adb",
|
|
"gpio_enabled": true,
|
|
"gpio_pin": 17,
|
|
"gpio_countdown_seconds": 60
|
|
}
|