diff --git a/CHANGELOG.md b/CHANGELOG.md index 358ca8e..449017f 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.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) | diff --git a/docs/history.html b/docs/history.html index 9f1ad0a..bd5cf92 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.11.12 + 2022-04-19 + battery() improved M1 support (mac OS) + 5.11.11 2022-04-19 diff --git a/docs/index.html b/docs/index.html index 47857b9..e627c1f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.11.11
+
New Version: 5.11.12
diff --git a/lib/battery.js b/lib/battery.js index 511e813..cfc6858 100644 --- a/lib/battery.js +++ b/lib/battery.js @@ -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', '=');