mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a6c1f1455 | ||
|
|
bd3b2647b4 | ||
|
|
cebc42126a | ||
|
|
2985b2f31c | ||
|
|
335f5b38a5 |
@@ -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");
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
@@ -207,6 +207,8 @@ namespace GHelper
|
|||||||
|
|
||||||
ToggleNavigation(0);
|
ToggleNavigation(0);
|
||||||
|
|
||||||
|
if (Program.acpi.DeviceGet(AsusACPI.DevsCPUFanCurve) < 0) buttonCalibrate.Visible = false;
|
||||||
|
|
||||||
FormClosed += Fans_FormClosed;
|
FormClosed += Fans_FormClosed;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -590,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
|
||||||
|
|||||||
@@ -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'">
|
||||||
|
|||||||
@@ -271,7 +271,7 @@
|
|||||||
<value>Zwiększ jasność</value>
|
<value>Zwiększ jasność</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Calibrate" xml:space="preserve">
|
<data name="Calibrate" xml:space="preserve">
|
||||||
<value>Calibrate</value>
|
<value>Kalibruj</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Ładowanie</value>
|
<value>Ładowanie</value>
|
||||||
|
|||||||
Reference in New Issue
Block a user