summaryrefslogtreecommitdiffstats
path: root/linux/Platform.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-09-10 19:56:33 +0200
committerChristian Göttsche <cgzones@googlemail.com>2020-11-16 16:38:54 +0100
commit1b225cd7a0af03a6349c48326118a287fc36acd0 (patch)
treedff0955221e7fce63e2308febbefdd58213d16c3 /linux/Platform.c
parent309f1d7282ec8efa4ff6b24a001a4908f5fd28d0 (diff)
Show CPU temperature in CPU meter
Show the CPU temperature in the CPU meter, like CPU frequency, instead of using an extra Meter.
Diffstat (limited to 'linux/Platform.c')
-rw-r--r--linux/Platform.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/Platform.c b/linux/Platform.c
index 28eb9f3c..97d713ae 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -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;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy