From 60c4870910257a232be4ce862fc5c92ae78b34e1 Mon Sep 17 00:00:00 2001 From: 135e2 <135e2@135e2.tk> Date: Sat, 13 Aug 2022 15:05:41 +0800 Subject: scripts/autofan.py: update to 20220813-2 --- scripts/autofan.py | 7 ++++--- 1 file 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) -- cgit v1.2.3