cpuTemperature() improved AMD support (linux)

This commit is contained in:
Sebastian Hildebrandt 2023-08-30 19:40:38 +02:00
parent aa04c63bdd
commit 443809397a

View File

@ -1067,7 +1067,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().indexOf('physical') >= 0)) {
} else if (value && label && result.main === null && (label.toLowerCase().indexOf('package') >= 0 || label.toLowerCase().indexOf('physical') >= 0 || label.toLowerCase() === 'tctl')) {
result.main = Math.round(parseInt(value, 10) / 100) / 10;
}
});