Files
padsleep_adb/requirements.txt
T
kushidouandClaude Fable 5 9940db451f 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>
2026-07-19 16:10:42 +08:00

14 lines
425 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# padsleep_adb 依赖
# 安装方式(在项目目录下):
# python3 -m venv .venv
# .venv/bin/pip install -r requirements.txt
adbutils>=2.12.0
rpi-lgpio>=0.6 # GPIO 电平检测(树莓派硬件传感器触发息屏/亮屏)
# 系统依赖:adb (Android Debug Bridge)
# 安装: sudo apt-get install adb
#
# TUI 使用 cursesPython 标准库),
# 某些系统需要: sudo apt-get install python3-curses