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

View File

@ -81,7 +81,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.13.1 | 2022-11-18 | `cpuTemperature()` fix main temp (linux) |
| 5.13.3 | 2022-11-18 | `cpuTemperature()` fix main temp (linux) |
| 5.13.2 | 2022-11-18 | `cpuTemperature()` fix main temp (linux) |
| 5.13.1 | 2022-11-18 | `processLoad()` fix main pid (linux) |
| 5.13.0 | 2022-11-17 | `networkConnections()` addedd process name (mac OS) |
| 5.12.15 | 2022-11-16 | `networkConnections()` adapted parsing to reflect also UDP (mac OS) |

View File

@ -58,7 +58,12 @@
</thead>
<tbody>
<tr>
<th scope="row">5.13.1</th>
<th scope="row">5.13.3</th>
<td>2022-11-18</td>
<td><span class="code">cpuTemperature()</span> fix main temp (linux)</td>
</tr>
<tr>
<th scope="row">5.13.2</th>
<td>2022-11-18</td>
<td><span class="code">cpuTemperature()</span> fix main temp (linux)</td>
</tr>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.13.2</span></div>
<div class="version">New Version: <span id="version">5.13.3</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">

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;
}
});