summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author135e2 <[email protected]>2022-08-13 15:05:41 +0800
committer135e2 <[email protected]>2022-08-13 15:05:41 +0800
commit60c4870910257a232be4ce862fc5c92ae78b34e1 (patch)
treea2c46916e1a97c08c60d87a3fdc56263795fbc22
parent780474b6300719f81865c89b949e65bb91e4d9e0 (diff)
downloaddotfiles-60c4870910257a232be4ce862fc5c92ae78b34e1.tar.gz
dotfiles-60c4870910257a232be4ce862fc5c92ae78b34e1.tar.bz2
dotfiles-60c4870910257a232be4ce862fc5c92ae78b34e1.zip
scripts/autofan.py: update to 20220813-2
-rw-r--r--scripts/autofan.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/autofan.py b/scripts/autofan.py
index 1072518..57d59aa 100644
--- a/scripts/autofan.py
+++ b/scripts/autofan.py
@@ -46,9 +46,10 @@ if os.path.exists("/usr/local/IS_HIGH_FLAG"):
try:
while True:
- # temp = open('/sys/class/thermal/thermal_zone0/temp')
- # temp = int(temp.read()) / 1000
- temp, msg = check_CPU_temp()
+ temp = open('/sys/class/thermal/thermal_zone0/temp')
+ temp = int(temp.read()) / 1000
+ msg = "%.1f ℃" % temp
+ #temp, msg = check_CPU_temp()
if temp > start_temp and not is_high: # 当SoC温度超过启动阈值且风扇处于关闭状态
lgpio.gpio_write(h, channel, 1)