battery() fixed isCharging (windows)
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user