diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-12-15 13:46:46 +0100 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-12-15 13:46:46 +0100 |
commit | eb36385a6bdfeb58eb9a441043b76948bf5d2e6b (patch) | |
tree | eaf1548be78a05d5e702ecc557df24fa81925b82 /linux/LibSensors.c | |
parent | 79970f05f37677fe32aa804e493c5da747a2652f (diff) |
LibSensors: restore temperature for Raspberry Pi
sensors output:
cpu_thermal-virtual-0
Adapter: Virtual device
temp1: +58.0 C (crit = +90.0 C)
Diffstat (limited to 'linux/LibSensors.c')
-rw-r--r-- | linux/LibSensors.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/LibSensors.c b/linux/LibSensors.c index cb3f1446..1e53882c 100644 --- a/linux/LibSensors.c +++ b/linux/LibSensors.c @@ -99,6 +99,9 @@ void LibSensors_getCPUTemperatures(CPUData* cpus, unsigned int cpuCount) { unsigned int tempId; if (String_startsWith(label, "Package ")) { tempId = 0; + } else if (String_startsWith(label, "temp")) { + /* Raspberry Pi has only temp1 */ + tempId = 0; } else if (String_startsWith(label, "Core ")) { tempId = 1 + atoi(label + strlen("Core ")); } else { |