diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dfac63..850f872 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 5.9.5 | 2021-10-08 | `battery()` fixed isCharging (windows) | | 5.9.4 | 2021-09-23 | `processes()` fixed memVsz, Memrss (macOS M1) | | 5.9.3 | 2021-09-17 | `cpuTemperature()` improved tdie detection (linus) | | 5.9.2 | 2021-09-16 | `graohics()` (macOS), `memLayout()` (win) improvements | diff --git a/docs/history.html b/docs/history.html index 9d59cb5..5d7241e 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.9.5 + 2021-10-08 + battery() fix isCharging (windows) + 5.9.4 2021-09-23 diff --git a/docs/index.html b/docs/index.html index 8b52a71..ef913e8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.9.4
+
New Version: 5.9.5
diff --git a/lib/battery.js b/lib/battery.js index 80302c7..5831d65 100644 --- a/lib/battery.js +++ b/lib/battery.js @@ -52,7 +52,7 @@ function parseWinBatteryPart(lines, designedCapacity, fullChargeCapacity) { result.percent = parseInt(util.getValue(lines, 'EstimatedChargeRemaining', '=') || 0); result.currentCapacity = parseInt(result.maxCapacity * result.percent / 100); result.isCharging = (statusValue >= 6 && statusValue <= 9) || statusValue === 11 || (!(statusValue === 3) && !(statusValue === 1) && result.percent < 100); - result.acConnected = result.ischarging || statusValue === 2; + result.acConnected = result.isCharging || statusValue === 2; result.model = util.getValue(lines, 'DeviceID', '='); } else { result.status = -1;