Skip to content

Commit

Permalink
battery() fixed designed capacity issue (windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhildebrandt committed Apr 2, 2024
1 parent e1549ba commit 5fe29c6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down
5 changes: 5 additions & 0 deletions docs/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ <h3>Full version history</h3>
</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>
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -204,15 +204,15 @@
</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">
<div id="downloads" class="numbers">...</div>
<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>
Expand Down
20 changes: 10 additions & 10 deletions docs/wifi.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ <h2>Wifi Networks</h2>
<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>
Expand All @@ -92,7 +92,7 @@ <h2>Wifi Networks</h2>
<td>[0].bssid</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>BSSID (mac)</td>
Expand All @@ -112,7 +112,7 @@ <h2>Wifi Networks</h2>
<td>[0].channel</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>channel</td>
Expand All @@ -122,7 +122,7 @@ <h2>Wifi Networks</h2>
<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>
Expand All @@ -132,7 +132,7 @@ <h2>Wifi Networks</h2>
<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>
Expand All @@ -142,7 +142,7 @@ <h2>Wifi Networks</h2>
<td>[0].quality</td>
<td>X</td>
<td></td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td>quality in %</td>
Expand All @@ -152,7 +152,7 @@ <h2>Wifi Networks</h2>
<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>
Expand All @@ -162,7 +162,7 @@ <h2>Wifi Networks</h2>
<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>
Expand Down
2 changes: 1 addition & 1 deletion lib/battery.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5fe29c6

Please sign in to comment.