diff options
| author | 135e2 <135e2@135e2.tk> | 2022-08-13 15:05:41 +0800 | 
|---|---|---|
| committer | 135e2 <135e2@135e2.tk> | 2022-08-13 15:05:41 +0800 | 
| commit | 60c4870910257a232be4ce862fc5c92ae78b34e1 (patch) | |
| tree | a2c46916e1a97c08c60d87a3fdc56263795fbc22 | |
| parent | 780474b6300719f81865c89b949e65bb91e4d9e0 (diff) | |
| download | dotfiles-60c4870910257a232be4ce862fc5c92ae78b34e1.tar.gz dotfiles-60c4870910257a232be4ce862fc5c92ae78b34e1.tar.bz2 dotfiles-60c4870910257a232be4ce862fc5c92ae78b34e1.zip  | |
scripts/autofan.py: update to 20220813-2
| -rw-r--r-- | scripts/autofan.py | 7 | 
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)  | 
