LibSensors: restore temperature for Raspberry Pi

sensors output:
  cpu_thermal-virtual-0
  Adapter: Virtual device
  temp1:        +58.0 C  (crit = +90.0 C)
This commit is contained in:
Christian Göttsche 2020-12-15 13:46:46 +01:00
parent 79970f05f3
commit eb36385a6b
1 changed files with 3 additions and 0 deletions

View File

@ -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 {