cpuTemperature() fix (linux)

This commit is contained in:
Sebastian Hildebrandt
2022-11-18 09:43:07 +01:00
parent 2c22f6adfd
commit ff24a460b1
4 changed files with 10 additions and 4 deletions
+1 -1
View File
@@ -1044,7 +1044,7 @@ function cpuTemperature(callback) {
const value = parts.length > 1 && parts[1] ? parts[1] : '0';
if (value && (label === undefined || (label && label.toLowerCase().startsWith('core')))) {
result.cores.push(Math.round(parseInt(value, 10) / 100) / 10);
} else if (value && label && result.main === null && (label.toLowerCase().indexOf('package') >= 0 || label.toLowerCase().startsWith('physical') >= 0)) {
} else if (value && label && result.main === null && (label.toLowerCase().indexOf('package') >= 0 || label.toLowerCase().indexOf('physical') >= 0)) {
result.main = Math.round(parseInt(value, 10) / 100) / 10;
}
});