CPU (FreeBSD): fix invalid CPU temperature

Ref: #1260
This commit is contained in:
李通洲 committed 2024-09-12 20:58:36 +08:00
1 parent 0c4edf7d0e
commit ce90689ba3
1 file changed
+2 -2
+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;
}