Compare commits

..

5 Commits

Author SHA1 Message Date
Serge
6a6c1f1455 Merge branch 'main' of https://github.com/seerge/g-helper 2023-09-12 19:31:53 +02:00
Serge
bd3b2647b4 Fixed exception at Fans+Power https://github.com/seerge/g-helper/issues/1303 2023-09-12 19:31:51 +02:00
Serge
cebc42126a Merge pull request #1296 from seerge/l10n_main
New Crowdin updates
2023-09-12 11:10:03 +02:00
Serge
2985b2f31c New translations Strings.resx (Polish) 2023-09-11 21:48:15 +02:00
Serge
335f5b38a5 Hide Calibrate button on not supported models 2023-09-11 19:40:58 +02:00
6 changed files with 16 additions and 5 deletions

View File

@@ -356,6 +356,11 @@ public static class AppConfig
ContainsModel("FX507Z");
}
public static bool IsFanScale()
{
return ContainsModel("GU604");
}
public static bool IsFanRequired()
{
return ContainsModel("GA402X") || ContainsModel("G513") || ContainsModel("G713R");

View File

@@ -400,7 +400,9 @@ public class AsusACPI
if (curve.All(singleByte => singleByte == 0)) return -1;
int result;
int fanScale = AppConfig.Get("fan_scale", 100);
int defaultScale = (AppConfig.IsFanScale() && (device == AsusFan.CPU || device == AsusFan.GPU)) ? 130 : 100;
int fanScale = AppConfig.Get("fan_scale", defaultScale);
if (fanScale != 100 && device == AsusFan.CPU) Logger.WriteLine("Custom fan scale: " + fanScale);

View File

@@ -7,6 +7,8 @@ namespace GHelper.Fan
public const int DEFAULT_FAN_MIN = 18;
public const int DEFAULT_FAN_MAX = 58;
public const int XGM_FAN_MAX = 72;
public const int INADEQUATE_MAX = 90;
const int FAN_COUNT = 3;
@@ -70,6 +72,8 @@ namespace GHelper.Fan
public static int GetFanMax(AsusFan device)
{
if (device == AsusFan.XGM) return XGM_FAN_MAX;
if (_fanMax[(int)device] < 0 || _fanMax[(int)device] > INADEQUATE_MAX)
SetFanMax(device, DEFAULT_FAN_MAX);

View File

@@ -207,6 +207,8 @@ namespace GHelper
ToggleNavigation(0);
if (Program.acpi.DeviceGet(AsusACPI.DevsCPUFanCurve) < 0) buttonCalibrate.Visible = false;
FormClosed += Fans_FormClosed;
}
@@ -590,8 +592,6 @@ namespace GHelper
int Min = FanSensorControl.DEFAULT_FAN_MIN;
int Max = FanSensorControl.GetFanMax(device);
if (device == AsusFan.XGM) Max = 72;
if (fanRpm)
return (200 * Math.Round((float)(Min * 100 + (Max - Min) * percentage) / 200)).ToString() + unit;
else

View File

@@ -15,7 +15,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<AssemblyVersion>0.122</AssemblyVersion>
<AssemblyVersion>0.123</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -271,7 +271,7 @@
<value>Zwiększ jasność</value>
</data>
<data name="Calibrate" xml:space="preserve">
<value>Calibrate</value>
<value>Kalibruj</value>
</data>
<data name="Charging" xml:space="preserve">
<value>Ładowanie</value>