CPU (FreeBSD): fix invalid CPU temperature

Ref: #1260
This commit is contained in:
李通洲
2024-09-12 20:55:28 +08:00
parent 0c4edf7d0e
commit ce90689ba3
+2 -2
View File
@@ -7,8 +7,8 @@ const char* ffDetectCpuTemp(double* current)
if (temp == -999999)
return "ffSysctlGetInt(\"dev.cpu.0.temperature\") failed";
// In tenth of degrees Celsius
*current = (double) temp / 10;
// In tenth of degrees Kelvin
*current = (double) temp / 10 - 273.15;
return NULL;
}