summaryrefslogtreecommitdiff
path: root/scripts/autofan.py
diff options
context:
space:
mode:
scripts/autofan.py: update to 20220813-2
Diffstat (limited to 'scripts/autofan.py')
-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)