mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Auto turn off 100% charge option when battery is fully charged https://github.com/seerge/g-helper/issues/1485
This commit is contained in:
@@ -7,6 +7,7 @@ using GHelper.Gpu.AMD;
|
||||
using GHelper.Helpers;
|
||||
using System.Diagnostics;
|
||||
using System.Management;
|
||||
using GHelper.Battery;
|
||||
|
||||
public static class HardwareControl
|
||||
{
|
||||
@@ -211,6 +212,7 @@ public static class HardwareControl
|
||||
if (fullCapacity > 0 && chargeCapacity > 0)
|
||||
{
|
||||
batteryCapacity = Math.Min(100, ((decimal)chargeCapacity / (decimal)fullCapacity) * 100);
|
||||
if (batteryCapacity > 99) BatteryControl.UnSetBatteryLimitFull();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user