battery() improved M1 support (mac OS)

This commit is contained in:
Sebastian Hildebrandt 2022-04-19 18:54:57 +02:00
parent 55e9d33736
commit 2e04715a7e
4 changed files with 9 additions and 3 deletions

View File

@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.11.12 | 2022-04-19 | `battery()` improved M1 support (mac OS) |
| 5.11.11 | 2022-04-19 | `networkInterfaces()` improved parsing (windows) |
| 5.11.10 | 2022-04-18 | updated docs |
| 5.11.9 | 2022-03-20 | `diskLayout()` fixed issue smartStatus (linux) |

View File

@ -57,6 +57,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.11.12</th>
<td>2022-04-19</td>
<td><span class="code">battery()</span> improved M1 support (mac OS)</td>
</tr>
<tr>
<th scope="row">5.11.11</th>
<td>2022-04-19</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.11.11</span></div>
<div class="version">New Version: <span id="version">5.11.12</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

@ -184,8 +184,8 @@ module.exports = function (callback) {
result.cycleCount = parseInt('0' + util.getValue(lines, 'cyclecount', '='), 10);
result.voltage = parseInt('0' + util.getValue(lines, 'voltage', '='), 10) / 1000.0;
result.capacityUnit = result.voltage ? 'mWh' : 'mAh';
result.maxCapacity = Math.round(parseInt('0' + util.getValue(lines, 'maxcapacity', '='), 10) * (result.voltage || 1));
result.currentCapacity = Math.round(parseInt('0' + util.getValue(lines, 'currentcapacity', '='), 10) * (result.voltage || 1));
result.maxCapacity = Math.round(parseInt('0' + util.getValue(lines, 'applerawmaxcapacity', '='), 10) * (result.voltage || 1));
result.currentCapacity = Math.round(parseInt('0' + util.getValue(lines, 'applerawxcurrentcapacity', '='), 10) * (result.voltage || 1));
result.designedCapacity = Math.round(parseInt('0' + util.getValue(lines, 'DesignCapacity', '='), 10) * (result.voltage || 1));
result.manufacturer = 'Apple';
result.serial = util.getValue(lines, 'BatterySerialNumber', '=');