mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Charge limit cleanup
This commit is contained in:
@@ -630,14 +630,9 @@ public static class AppConfig
|
|||||||
return IsAlly() || Is("stop_ac");
|
return IsAlly() || Is("stop_ac");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsChargeLimit80()
|
|
||||||
{
|
|
||||||
return ContainsModel("GA403UI");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsChargeLimit6080()
|
public static bool IsChargeLimit6080()
|
||||||
{
|
{
|
||||||
return ContainsModel("GA403UU") || ContainsModel("GA403UV") || ContainsModel("GU605") || ContainsModel("GA503R") || (IsTUF() && !(ContainsModel("FX507Z") || ContainsModel("FA617")));
|
return ContainsModel("GA403U") || ContainsModel("GU605") || ContainsModel("GA503R") || (IsTUF() && !(ContainsModel("FX507Z") || ContainsModel("FA617")));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,11 +36,6 @@ namespace GHelper.Battery
|
|||||||
if (limit < 0) limit = AppConfig.Get("charge_limit");
|
if (limit < 0) limit = AppConfig.Get("charge_limit");
|
||||||
if (limit < 40 || limit > 100) return;
|
if (limit < 40 || limit > 100) return;
|
||||||
|
|
||||||
if (AppConfig.IsChargeLimit80())
|
|
||||||
{
|
|
||||||
limit = (limit <= 80) ? 80 : 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AppConfig.IsChargeLimit6080())
|
if (AppConfig.IsChargeLimit6080())
|
||||||
{
|
{
|
||||||
if (limit > 80) limit = 100;
|
if (limit > 80) limit = 100;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.175</AssemblyVersion>
|
<AssemblyVersion>0.176</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
Reference in New Issue
Block a user