Show CPU temperature in CPU meter

Show the CPU temperature in the CPU meter, like CPU frequency, instead
of using an extra Meter.
This commit is contained in:
Christian Göttsche
2020-09-10 19:56:33 +02:00
parent 309f1d7282
commit 1b225cd7a0
19 changed files with 220 additions and 23 deletions

View File

@ -241,6 +241,12 @@ double Platform_setCPUValues(Meter* this, int cpu) {
v[CPU_METER_FREQUENCY] = cpuData->frequency;
#ifdef HAVE_LIBSENSORS
v[CPU_METER_TEMPERATURE] = cpuData->temperature;
#else
v[CPU_METER_TEMPERATURE] = NAN;
#endif
return percent;
}