battery() fixed designed capacity issue (windows)

This commit is contained in:
Sebastian Hildebrandt 2024-04-02 15:18:01 +02:00
parent e1549ba04c
commit 5fe29c64ba
5 changed files with 20 additions and 14 deletions

View File

@ -83,6 +83,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.22.7 | 2024-04-02 | `battery()` fixed designed capacity issue (windows) |
| 5.22.6 | 2024-03-20 | `networkInterfaces()` fixed speed of not connected interfaces (windows) |
| 5.22.5 | 2024-03-19 | `wifiConnections()` fixed formatting bssid (macOS) |
| 5.22.4 | 2024-03-16 | `uuid()` improved parsing machine id (linux) |

View File

@ -57,6 +57,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.22.7</th>
<td>2024-04-02</td>
<td><span class="code">battery()</span> fixed designed capacity issue (windows)</td>
</tr>
<tr>
<th scope="row">5.22.6</th>
<td>2024-03-20</td>

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.22.6</span></div>
<div class="version">New Version: <span id="version">5.22.7</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">
@ -204,7 +204,7 @@
</div>
<div class="row number-section">
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">15,727</div>
<div class="numbers">15,877</div>
<div class="title">Lines of code</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
@ -212,7 +212,7 @@
<div class="title">Downloads last month</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">676</div>
<div class="numbers">689</div>
<div class="title">Dependents</div>
</div>
</div>

View File

@ -72,17 +72,17 @@
<td>[{...}]</td>
<td>X</td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>array of available wifi networks</td>
<td>array of available wifi networks<br>since macOS Sonoma 14.4 not available</td>
</tr>
<tr>
<td></td>
<td>[0].ssid</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>Wifi network SSID</td>
@ -92,7 +92,7 @@
<td>[0].bssid</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>BSSID (mac)</td>
@ -112,7 +112,7 @@
<td>[0].channel</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>channel</td>
@ -122,7 +122,7 @@
<td>[0].frequency</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>frequency in MHz</td>
@ -132,7 +132,7 @@
<td>[0].signalLevel</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>signal level in dB</td>
@ -142,7 +142,7 @@
<td>[0].quality</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>quality in %</td>
@ -152,7 +152,7 @@
<td>[0].security</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>array e.g. WPA, WPA-2</td>
@ -162,7 +162,7 @@
<td>[0].wpaFlags</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>array of WPA flags</td>

View File

@ -229,7 +229,7 @@ module.exports = function (callback) {
try {
const workload = [];
workload.push(util.powerShell('Get-CimInstance Win32_Battery | select BatteryStatus, DesignCapacity, DesignVoltage, EstimatedChargeRemaining, DeviceID | fl'));
workload.push(util.powerShell('(Get-CimInstance -Class BatteryStaticData -Namespace ROOT/WMI).DesignedCapacity'));
workload.push(util.powerShell('(Get-WmiObject -Class BatteryStaticData -Namespace ROOT/WMI).DesignedCapacity'));
workload.push(util.powerShell('(Get-CimInstance -Class BatteryFullChargedCapacity -Namespace ROOT/WMI).FullChargedCapacity'));
util.promiseAll(
workload