diff --git a/app/Battery/BatteryControl.cs b/app/Battery/BatteryControl.cs index 3400eac7..6f41b246 100644 --- a/app/Battery/BatteryControl.cs +++ b/app/Battery/BatteryControl.cs @@ -13,10 +13,14 @@ { AppConfig.Set("charge_full", 1); Program.acpi.DeviceSet(AsusACPI.BatteryLimit, 100, "BatteryLimit"); - Program.settingsForm.VisualiseBatteryFull(); } + public static void UnSetBatteryLimitFull() + { + AppConfig.Set("charge_full", 0); + Program.settingsForm.VisualiseBatteryFull(); + } public static void AutoBattery(bool init = false) { diff --git a/app/HardwareControl.cs b/app/HardwareControl.cs index 05f35dcb..86c1c462 100644 --- a/app/HardwareControl.cs +++ b/app/HardwareControl.cs @@ -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(); }