mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-06 13:24:33 +02:00
skip temp sensor that report as 0
This commit is contained in:
parent
98cd5dd31f
commit
d3760eaf37
@ -1235,16 +1235,18 @@ def sysinfo():
|
|||||||
# iterate over all temperatures in the current sensor
|
# iterate over all temperatures in the current sensor
|
||||||
for temp in temp_sensors[sensor]:
|
for temp in temp_sensors[sensor]:
|
||||||
if 'CPU' in temp.label:
|
if 'CPU' in temp.label:
|
||||||
|
if temp.current != 0:
|
||||||
temp_per_cpu = [temp.current] * online_cpu_count
|
temp_per_cpu = [temp.current] * online_cpu_count
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
if "acpitz" in temp_sensors:
|
for sensor in ["acpitz", "k10temp"]:
|
||||||
temp_per_cpu = [temp_sensors["acpitz"][0].current] * online_cpu_count
|
if sensor in temp_sensors:
|
||||||
elif "k10temp" in temp_sensors:
|
if temp_sensors[sensor][0].current != 0:
|
||||||
temp_per_cpu = [temp_sensors["k10temp"][0].current] * online_cpu_count
|
temp_per_cpu = [temp_sensors[sensor][0].current] * online_cpu_count
|
||||||
|
break;
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(repr(e))
|
print(repr(e))
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user