10 Commits

Author SHA1 Message Date
星光-k
28895e7188 Update clean.sh 2025-01-12 14:55:53 +08:00
星光-k
8a4ba07f5b Update e-Paper_clean.service 2025-01-12 14:55:35 +08:00
星光-k
ecaa4006ce Update e-Paper_clean.service 2025-01-12 14:55:24 +08:00
星光-k
c5a3ef0dcf Update main.py 2025-01-12 14:52:18 +08:00
星光-k
99c2bb3152 Update main.py 2025-01-12 14:45:24 +08:00
星光-k
533e76d536 Update main.py 2025-01-12 14:08:23 +08:00
星光-k
26ee5bf6e7 Update main.py 2025-01-12 14:07:17 +08:00
星光-k
a710b293b6 Update main.py 2025-01-12 13:53:03 +08:00
星光-k
3a90a36ffa 更新 main.py 2025-01-12 05:34:51 +00:00
星光-k
fdd3e6008a 更新 main.py 2025-01-12 05:31:35 +00:00
3 changed files with 292 additions and 295 deletions

View File

@@ -5,7 +5,7 @@ dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
logdir=${dir%/*} logdir=${dir%/*}
screen_name="clean_screen" screen_name="clean_screen"
service_name="raspi_e-Paper.service" service_name="raspi_e-Paper.service"
hold_time_seconds=5 # 设置维持时间例如300秒5分钟 hold_time_seconds=3 # 设置维持时间例如300秒5分钟
# 创建一个新的screen会话并运行Python脚本 # 创建一个新的screen会话并运行Python脚本
screen -dmS $screen_name /usr/bin/python3 -u $dir/$f_name > $logdir/log/clean-info.log 2>&1 screen -dmS $screen_name /usr/bin/python3 -u $dir/$f_name > $logdir/log/clean-info.log 2>&1

View File

@@ -8,7 +8,6 @@ Before=reboot.target
Type=oneshot Type=oneshot
ExecStart=/bin/bash /root/2.13-Ink-screen-clock/bin/clean.sh ExecStart=/bin/bash /root/2.13-Ink-screen-clock/bin/clean.sh
RemainAfterExit=yes RemainAfterExit=yes
TimeoutSec=5
[Install] [Install]
WantedBy=shutdown.target WantedBy=shutdown.target

View File

@@ -143,8 +143,6 @@ def Basic_refresh(): #全刷函数
logging.info("Refresh and prepare the basic content before starting the canvas")#开始画布前刷新准备基础内容 logging.info("Refresh and prepare the basic content before starting the canvas")#开始画布前刷新准备基础内容
epd.init() epd.init()
epd.Clear(0xFF) epd.Clear(0xFF)
epd.init()
epd.Clear(0xFF)
global get_date_var global get_date_var
get_date_var=get_date() #记录开始数据 get_date_var=get_date() #记录开始数据
draw.text((2,2),get_date_var,font = font02,fill =0)#将日期及星期几显示到屏幕 draw.text((2,2),get_date_var,font = font02,fill =0)#将日期及星期几显示到屏幕