This commit is contained in:
Serge
2023-09-12 19:31:51 +02:00
parent 335f5b38a5
commit bd3b2647b4
5 changed files with 13 additions and 4 deletions

View File

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

View File

@@ -400,7 +400,9 @@ public class AsusACPI
if (curve.All(singleByte => singleByte == 0)) return -1; if (curve.All(singleByte => singleByte == 0)) return -1;
int result; 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); 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_MIN = 18;
public const int DEFAULT_FAN_MAX = 58; public const int DEFAULT_FAN_MAX = 58;
public const int XGM_FAN_MAX = 72;
public const int INADEQUATE_MAX = 90; public const int INADEQUATE_MAX = 90;
const int FAN_COUNT = 3; const int FAN_COUNT = 3;
@@ -70,6 +72,8 @@ namespace GHelper.Fan
public static int GetFanMax(AsusFan device) public static int GetFanMax(AsusFan device)
{ {
if (device == AsusFan.XGM) return XGM_FAN_MAX;
if (_fanMax[(int)device] < 0 || _fanMax[(int)device] > INADEQUATE_MAX) if (_fanMax[(int)device] < 0 || _fanMax[(int)device] > INADEQUATE_MAX)
SetFanMax(device, DEFAULT_FAN_MAX); SetFanMax(device, DEFAULT_FAN_MAX);

View File

@@ -592,8 +592,6 @@ namespace GHelper
int Min = FanSensorControl.DEFAULT_FAN_MIN; int Min = FanSensorControl.DEFAULT_FAN_MIN;
int Max = FanSensorControl.GetFanMax(device); int Max = FanSensorControl.GetFanMax(device);
if (device == AsusFan.XGM) Max = 72;
if (fanRpm) if (fanRpm)
return (200 * Math.Round((float)(Min * 100 + (Max - Min) * percentage) / 200)).ToString() + unit; return (200 * Math.Round((float)(Min * 100 + (Max - Min) * percentage) / 200)).ToString() + unit;
else else

View File

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