From ffd9bf667312956b36f703c47b17cd207565a984 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:09:30 +0200 Subject: [PATCH] Cleanup --- app/AsusACPI.cs | 4 +--- app/Program.cs | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/AsusACPI.cs b/app/AsusACPI.cs index 403480bb..11658829 100644 --- a/app/AsusACPI.cs +++ b/app/AsusACPI.cs @@ -254,7 +254,7 @@ public bool IsConnected() return _connected; } - public AsusACPI(bool light = false) + public AsusACPI() { try { @@ -278,8 +278,6 @@ public AsusACPI(bool light = false) Logger.WriteLine($"Can't connect to ACPI: {ex.Message}"); } - if (light) return; - if (AppConfig.IsAdvantageEdition()) { MaxTotal = 250; diff --git a/app/Program.cs b/app/Program.cs index 5113b0ef..247f683c 100644 --- a/app/Program.cs +++ b/app/Program.cs @@ -340,11 +340,11 @@ static void BatteryLimit() { try { - int limit = 80; + int limit = AppConfig.Get("charge_limit"); if (limit > 0 && limit < 100) { Logger.WriteLine($"------- Startup Battery Limit {limit} -------"); - acpi = new AsusACPI(true); + acpi = new AsusACPI(); acpi.DeviceSet(AsusACPI.BatteryLimit, limit, "Limit"); } }