Auto turn off 100% charge option when battery is fully charged https://github.com/seerge/g-helper/issues/1485

This commit is contained in:
Serge
2023-10-19 14:36:19 +02:00
parent 168b751795
commit 8c1885c2ae
2 changed files with 7 additions and 1 deletions

View File

@@ -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();
}