Merge pull request #436 from cgzones/freebsd

FreeBSD: add support for CPU frequency and temperature
Tested on two physical systems running FreeBSD 12.1
This commit is contained in:
Graham Inggs
2021-03-18 14:03:51 +02:00
committed by GitHub
8 changed files with 88 additions and 12 deletions

View File

@ -79,7 +79,7 @@ static void CPUMeter_updateValues(Meter* this) {
}
}
#ifdef HAVE_SENSORS_SENSORS_H
#ifdef BUILD_WITH_CPU_TEMP
if (this->pl->settings->showCPUTemperature) {
double cpuTemperature = this->values[CPU_METER_TEMPERATURE];
if (isnan(cpuTemperature))
@ -150,7 +150,7 @@ static void CPUMeter_display(const Object* cast, RichString* out) {
}
}
#ifdef HAVE_SENSORS_SENSORS_H
#ifdef BUILD_WITH_CPU_TEMP
if (this->pl->settings->showCPUTemperature) {
char cpuTemperatureBuffer[10];
double cpuTemperature = this->values[CPU_METER_TEMPERATURE];