From 443809397a5819b58394d97f89a4064d9236c4e0 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 30 Aug 2023 19:40:38 +0200 Subject: [PATCH] cpuTemperature() improved AMD support (linux) --- lib/cpu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cpu.js b/lib/cpu.js index 0c16d5c..1df2733 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -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; } });