mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Compare commits
62 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a6c1f1455 | ||
|
|
bd3b2647b4 | ||
|
|
cebc42126a | ||
|
|
2985b2f31c | ||
|
|
335f5b38a5 | ||
|
|
4dd9daa95c | ||
|
|
10db075ece | ||
|
|
a800eae020 | ||
|
|
eb21fb2020 | ||
|
|
600e6a9404 | ||
|
|
4b0fbcbf10 | ||
|
|
215aec34b9 | ||
|
|
9cba686a3c | ||
|
|
43a7eb8b32 | ||
|
|
08eb867ae7 | ||
|
|
5c59c34a6c | ||
|
|
ae2dae8a97 | ||
|
|
c06969ba8f | ||
|
|
496d55f88b | ||
|
|
2b16372ec4 | ||
|
|
041aa40a6d | ||
|
|
55c1dd7e16 | ||
|
|
2ec2f669fb | ||
|
|
17ea6157a6 | ||
|
|
d5bdf180a8 | ||
|
|
a7d5ac5de9 | ||
|
|
b103623099 | ||
|
|
751f4d0331 | ||
|
|
1f536d8d84 | ||
|
|
c900121644 | ||
|
|
9ce038fe19 | ||
|
|
1f66038ab9 | ||
|
|
04d2eb53a2 | ||
|
|
f55a3c0824 | ||
|
|
8f0e4431e6 | ||
|
|
bff2676b64 | ||
|
|
e9e5fe1cc9 | ||
|
|
e6a78fc8f7 | ||
|
|
0e3efcf547 | ||
|
|
5c5b4f297c | ||
|
|
6f1c2ce7c1 | ||
|
|
e26feb7025 | ||
|
|
fef0042870 | ||
|
|
5a1a303ce7 | ||
|
|
5849dc0ce9 | ||
|
|
31ca13692b | ||
|
|
49cfbc6235 | ||
|
|
b577e5ed90 | ||
|
|
3c9dca0c62 | ||
|
|
818b87fe87 | ||
|
|
e177207799 | ||
|
|
df4cf40a5b | ||
|
|
23082d59ba | ||
|
|
708170b1ef | ||
|
|
3a0131a577 | ||
|
|
d1f4da5473 | ||
|
|
91967638af | ||
|
|
d9a972f6a9 | ||
|
|
ce4c9bb48c | ||
|
|
26c74fa1df | ||
|
|
4ae3fb4e3d | ||
|
|
20e7dd96a1 |
@@ -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");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Management;
|
using GHelper;
|
||||||
|
using System.Management;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
public enum AsusFan
|
public enum AsusFan
|
||||||
@@ -104,6 +105,8 @@ public class AsusACPI
|
|||||||
public const int ScreenPadToggle = 0x00050031;
|
public const int ScreenPadToggle = 0x00050031;
|
||||||
public const int ScreenPadBrightness = 0x00050032;
|
public const int ScreenPadBrightness = 0x00050032;
|
||||||
|
|
||||||
|
public const int BootSound = 0x00130022;
|
||||||
|
|
||||||
public const int Tablet_Notebook = 0;
|
public const int Tablet_Notebook = 0;
|
||||||
public const int Tablet_Tablet = 1;
|
public const int Tablet_Tablet = 1;
|
||||||
public const int Tablet_Tent = 2;
|
public const int Tablet_Tent = 2;
|
||||||
@@ -344,6 +347,32 @@ public class AsusACPI
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int GetFan(AsusFan device)
|
||||||
|
{
|
||||||
|
int fan = -1;
|
||||||
|
|
||||||
|
switch (device)
|
||||||
|
{
|
||||||
|
case AsusFan.GPU:
|
||||||
|
fan = Program.acpi.DeviceGet(GPU_Fan);
|
||||||
|
break;
|
||||||
|
case AsusFan.Mid:
|
||||||
|
fan = Program.acpi.DeviceGet(Mid_Fan);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fan = Program.acpi.DeviceGet(CPU_Fan);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fan < 0)
|
||||||
|
{
|
||||||
|
fan += 65536;
|
||||||
|
if (fan <= 0 || fan > 100) fan = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return fan;
|
||||||
|
}
|
||||||
|
|
||||||
public int SetFanRange(AsusFan device, byte[] curve)
|
public int SetFanRange(AsusFan device, byte[] curve)
|
||||||
{
|
{
|
||||||
byte min = (byte)(curve[8] * 255 / 100);
|
byte min = (byte)(curve[8] * 255 / 100);
|
||||||
@@ -371,13 +400,15 @@ 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);
|
||||||
|
|
||||||
// it seems to be a bug, when some old model's bios can go nuts if fan is set to 100%
|
// it seems to be a bug, when some old model's bios can go nuts if fan is set to 100%
|
||||||
|
|
||||||
for (int i = 8; i < curve.Length; i++) curve[i] = (byte)(Math.Max((byte)0, Math.Min((byte)99, curve[i])) * fanScale / 100);
|
for (int i = 8; i < curve.Length; i++) curve[i] = (byte)(Math.Max((byte)0, Math.Min((byte)100, curve[i])) * fanScale / 100);
|
||||||
|
|
||||||
switch (device)
|
switch (device)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -333,13 +333,15 @@ namespace GHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void ApplyBrightness(int brightness, string log = "Backlight")
|
public static void ApplyBrightness(int brightness, string log = "Backlight", bool delay = false)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (delay) await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
|
|
||||||
if (isTuf) Program.acpi.TUFKeyboardBrightness(brightness);
|
if (isTuf) Program.acpi.TUFKeyboardBrightness(brightness);
|
||||||
|
|
||||||
byte[] msg = { AURA_HID_ID, 0xba, 0xc5, 0xc4, (byte)brightness };
|
byte[] msg = { AURA_HID_ID, 0xba, 0xc5, 0xc4, (byte)brightness };
|
||||||
@@ -644,6 +646,8 @@ namespace GHelper
|
|||||||
byte[] ASUS_INIT = Encoding.ASCII.GetBytes("^ASUS Tech.Inc.");
|
byte[] ASUS_INIT = Encoding.ASCII.GetBytes("^ASUS Tech.Inc.");
|
||||||
|
|
||||||
SetXGM(ASUS_INIT);
|
SetXGM(ASUS_INIT);
|
||||||
|
|
||||||
|
/*
|
||||||
SetXGM(new byte[] { 0x5e, 0xd0, 0x02 });
|
SetXGM(new byte[] { 0x5e, 0xd0, 0x02 });
|
||||||
SetXGM(new byte[] { 0x5e, 0xd0, 0x03 });
|
SetXGM(new byte[] { 0x5e, 0xd0, 0x03 });
|
||||||
SetXGM(ASUS_INIT);
|
SetXGM(ASUS_INIT);
|
||||||
@@ -652,6 +656,7 @@ namespace GHelper
|
|||||||
SetXGM(new byte[] { 0x5e, 0xce, 0x03 });
|
SetXGM(new byte[] { 0x5e, 0xce, 0x03 });
|
||||||
SetXGM(new byte[] { 0x5e, 0xd0, 0x04 });
|
SetXGM(new byte[] { 0x5e, 0xd0, 0x04 });
|
||||||
SetXGM(new byte[] { 0x5e, 0xd0, 0x01 });
|
SetXGM(new byte[] { 0x5e, 0xd0, 0x01 });
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ApplyXGMLight(bool status)
|
public static void ApplyXGMLight(bool status)
|
||||||
|
|||||||
28
app/Extra.Designer.cs
generated
28
app/Extra.Designer.cs
generated
@@ -115,6 +115,7 @@ namespace GHelper
|
|||||||
labelHibernateAfter = new Label();
|
labelHibernateAfter = new Label();
|
||||||
pictureHibernate = new PictureBox();
|
pictureHibernate = new PictureBox();
|
||||||
toolTip = new ToolTip(components);
|
toolTip = new ToolTip(components);
|
||||||
|
checkBootSound = new CheckBox();
|
||||||
panelServices.SuspendLayout();
|
panelServices.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureService).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureService).BeginInit();
|
||||||
panelBindingsHeader.SuspendLayout();
|
panelBindingsHeader.SuspendLayout();
|
||||||
@@ -147,7 +148,7 @@ namespace GHelper
|
|||||||
panelServices.Controls.Add(labelServices);
|
panelServices.Controls.Add(labelServices);
|
||||||
panelServices.Controls.Add(buttonServices);
|
panelServices.Controls.Add(buttonServices);
|
||||||
panelServices.Dock = DockStyle.Top;
|
panelServices.Dock = DockStyle.Top;
|
||||||
panelServices.Location = new Point(15, 1279);
|
panelServices.Location = new Point(15, 1321);
|
||||||
panelServices.Name = "panelServices";
|
panelServices.Name = "panelServices";
|
||||||
panelServices.Size = new Size(983, 75);
|
panelServices.Size = new Size(983, 75);
|
||||||
panelServices.TabIndex = 5;
|
panelServices.TabIndex = 5;
|
||||||
@@ -1065,6 +1066,7 @@ namespace GHelper
|
|||||||
panelSettings.Controls.Add(checkAutoToggleClamshellMode);
|
panelSettings.Controls.Add(checkAutoToggleClamshellMode);
|
||||||
panelSettings.Controls.Add(checkTopmost);
|
panelSettings.Controls.Add(checkTopmost);
|
||||||
panelSettings.Controls.Add(checkNoOverdrive);
|
panelSettings.Controls.Add(checkNoOverdrive);
|
||||||
|
panelSettings.Controls.Add(checkBootSound);
|
||||||
panelSettings.Controls.Add(checkUSBC);
|
panelSettings.Controls.Add(checkUSBC);
|
||||||
panelSettings.Controls.Add(checkVariBright);
|
panelSettings.Controls.Add(checkVariBright);
|
||||||
panelSettings.Controls.Add(checkGpuApps);
|
panelSettings.Controls.Add(checkGpuApps);
|
||||||
@@ -1073,14 +1075,14 @@ namespace GHelper
|
|||||||
panelSettings.Location = new Point(15, 921);
|
panelSettings.Location = new Point(15, 921);
|
||||||
panelSettings.Name = "panelSettings";
|
panelSettings.Name = "panelSettings";
|
||||||
panelSettings.Padding = new Padding(20, 5, 11, 5);
|
panelSettings.Padding = new Padding(20, 5, 11, 5);
|
||||||
panelSettings.Size = new Size(983, 304);
|
panelSettings.Size = new Size(983, 346);
|
||||||
panelSettings.TabIndex = 3;
|
panelSettings.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// checkAutoToggleClamshellMode
|
// checkAutoToggleClamshellMode
|
||||||
//
|
//
|
||||||
checkAutoToggleClamshellMode.AutoSize = true;
|
checkAutoToggleClamshellMode.AutoSize = true;
|
||||||
checkAutoToggleClamshellMode.Dock = DockStyle.Top;
|
checkAutoToggleClamshellMode.Dock = DockStyle.Top;
|
||||||
checkAutoToggleClamshellMode.Location = new Point(20, 257);
|
checkAutoToggleClamshellMode.Location = new Point(20, 299);
|
||||||
checkAutoToggleClamshellMode.Name = "checkAutoToggleClamshellMode";
|
checkAutoToggleClamshellMode.Name = "checkAutoToggleClamshellMode";
|
||||||
checkAutoToggleClamshellMode.Padding = new Padding(3);
|
checkAutoToggleClamshellMode.Padding = new Padding(3);
|
||||||
checkAutoToggleClamshellMode.Size = new Size(952, 42);
|
checkAutoToggleClamshellMode.Size = new Size(952, 42);
|
||||||
@@ -1092,7 +1094,7 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
checkTopmost.AutoSize = true;
|
checkTopmost.AutoSize = true;
|
||||||
checkTopmost.Dock = DockStyle.Top;
|
checkTopmost.Dock = DockStyle.Top;
|
||||||
checkTopmost.Location = new Point(20, 215);
|
checkTopmost.Location = new Point(20, 257);
|
||||||
checkTopmost.Margin = new Padding(4, 3, 4, 3);
|
checkTopmost.Margin = new Padding(4, 3, 4, 3);
|
||||||
checkTopmost.Name = "checkTopmost";
|
checkTopmost.Name = "checkTopmost";
|
||||||
checkTopmost.Padding = new Padding(3);
|
checkTopmost.Padding = new Padding(3);
|
||||||
@@ -1105,7 +1107,7 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
checkNoOverdrive.AutoSize = true;
|
checkNoOverdrive.AutoSize = true;
|
||||||
checkNoOverdrive.Dock = DockStyle.Top;
|
checkNoOverdrive.Dock = DockStyle.Top;
|
||||||
checkNoOverdrive.Location = new Point(20, 173);
|
checkNoOverdrive.Location = new Point(20, 215);
|
||||||
checkNoOverdrive.Margin = new Padding(4, 3, 4, 3);
|
checkNoOverdrive.Margin = new Padding(4, 3, 4, 3);
|
||||||
checkNoOverdrive.Name = "checkNoOverdrive";
|
checkNoOverdrive.Name = "checkNoOverdrive";
|
||||||
checkNoOverdrive.Padding = new Padding(3);
|
checkNoOverdrive.Padding = new Padding(3);
|
||||||
@@ -1172,7 +1174,7 @@ namespace GHelper
|
|||||||
panelPower.Controls.Add(labelHibernateAfter);
|
panelPower.Controls.Add(labelHibernateAfter);
|
||||||
panelPower.Controls.Add(pictureHibernate);
|
panelPower.Controls.Add(pictureHibernate);
|
||||||
panelPower.Dock = DockStyle.Top;
|
panelPower.Dock = DockStyle.Top;
|
||||||
panelPower.Location = new Point(15, 1225);
|
panelPower.Location = new Point(15, 1267);
|
||||||
panelPower.Name = "panelPower";
|
panelPower.Name = "panelPower";
|
||||||
panelPower.Size = new Size(983, 54);
|
panelPower.Size = new Size(983, 54);
|
||||||
panelPower.TabIndex = 4;
|
panelPower.TabIndex = 4;
|
||||||
@@ -1209,6 +1211,19 @@ namespace GHelper
|
|||||||
pictureHibernate.TabIndex = 22;
|
pictureHibernate.TabIndex = 22;
|
||||||
pictureHibernate.TabStop = false;
|
pictureHibernate.TabStop = false;
|
||||||
//
|
//
|
||||||
|
// checkBootSound
|
||||||
|
//
|
||||||
|
checkBootSound.AutoSize = true;
|
||||||
|
checkBootSound.Dock = DockStyle.Top;
|
||||||
|
checkBootSound.Location = new Point(20, 173);
|
||||||
|
checkBootSound.Margin = new Padding(4, 3, 4, 3);
|
||||||
|
checkBootSound.Name = "checkBootSound";
|
||||||
|
checkBootSound.Padding = new Padding(3);
|
||||||
|
checkBootSound.Size = new Size(952, 42);
|
||||||
|
checkBootSound.TabIndex = 10;
|
||||||
|
checkBootSound.Text = "Boot Sound";
|
||||||
|
checkBootSound.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// Extra
|
// Extra
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||||
@@ -1356,5 +1371,6 @@ namespace GHelper
|
|||||||
private NumericUpDown numericHibernateAfter;
|
private NumericUpDown numericHibernateAfter;
|
||||||
private CheckBox checkGPUFix;
|
private CheckBox checkGPUFix;
|
||||||
private ToolTip toolTip;
|
private ToolTip toolTip;
|
||||||
|
private CheckBox checkBootSound;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -108,6 +108,7 @@ namespace GHelper
|
|||||||
checkSleep.Text = Properties.Strings.Sleep;
|
checkSleep.Text = Properties.Strings.Sleep;
|
||||||
checkBoot.Text = Properties.Strings.Boot;
|
checkBoot.Text = Properties.Strings.Boot;
|
||||||
checkShutdown.Text = Properties.Strings.Shutdown;
|
checkShutdown.Text = Properties.Strings.Shutdown;
|
||||||
|
checkBootSound.Text = Properties.Strings.BootSound;
|
||||||
|
|
||||||
labelSpeed.Text = Properties.Strings.AnimationSpeed;
|
labelSpeed.Text = Properties.Strings.AnimationSpeed;
|
||||||
//labelBrightness.Text = Properties.Strings.Brightness;
|
//labelBrightness.Text = Properties.Strings.Brightness;
|
||||||
@@ -311,6 +312,9 @@ namespace GHelper
|
|||||||
checkGpuApps.Checked = AppConfig.Is("kill_gpu_apps");
|
checkGpuApps.Checked = AppConfig.Is("kill_gpu_apps");
|
||||||
checkGpuApps.CheckedChanged += CheckGpuApps_CheckedChanged;
|
checkGpuApps.CheckedChanged += CheckGpuApps_CheckedChanged;
|
||||||
|
|
||||||
|
checkBootSound.Checked = (Program.acpi.DeviceGet(AsusACPI.BootSound) == 1);
|
||||||
|
checkBootSound.CheckedChanged += CheckBootSound_CheckedChanged;
|
||||||
|
|
||||||
pictureHelp.Click += PictureHelp_Click;
|
pictureHelp.Click += PictureHelp_Click;
|
||||||
buttonServices.Click += ButtonServices_Click;
|
buttonServices.Click += ButtonServices_Click;
|
||||||
|
|
||||||
@@ -327,6 +331,11 @@ namespace GHelper
|
|||||||
InitHibernate();
|
InitHibernate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CheckBootSound_CheckedChanged(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Program.acpi.DeviceSet(AsusACPI.BootSound, (checkBootSound.Checked ? 1 : 0), "BootSound");
|
||||||
|
}
|
||||||
|
|
||||||
private void CheckGPUFix_CheckedChanged(object? sender, EventArgs e)
|
private void CheckGPUFix_CheckedChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
AppConfig.Set("gpu_fix", (checkGPUFix.Checked ? 1 : 0));
|
AppConfig.Set("gpu_fix", (checkGPUFix.Checked ? 1 : 0));
|
||||||
|
|||||||
185
app/Fan/FanSensorControl.cs
Normal file
185
app/Fan/FanSensorControl.cs
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
using GHelper.Mode;
|
||||||
|
|
||||||
|
namespace GHelper.Fan
|
||||||
|
{
|
||||||
|
public class FanSensorControl
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
Fans fansForm;
|
||||||
|
ModeControl modeControl = Program.modeControl;
|
||||||
|
|
||||||
|
static int[] measuredMax;
|
||||||
|
static int sameCount = 0;
|
||||||
|
|
||||||
|
static System.Timers.Timer timer = default!;
|
||||||
|
|
||||||
|
static int[] _fanMax = InitFanMax();
|
||||||
|
static bool _fanRpm = AppConfig.IsNotFalse("fan_rpm");
|
||||||
|
|
||||||
|
public FanSensorControl(Fans fansForm)
|
||||||
|
{
|
||||||
|
this.fansForm = fansForm;
|
||||||
|
timer = new System.Timers.Timer(1000);
|
||||||
|
timer.Elapsed += Timer_Elapsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int[] InitFanMax()
|
||||||
|
{
|
||||||
|
int[] defaultMax = GetDefaultMax();
|
||||||
|
|
||||||
|
return new int[3] {
|
||||||
|
AppConfig.Get("fan_max_" + (int)AsusFan.CPU, defaultMax[(int)AsusFan.CPU]),
|
||||||
|
AppConfig.Get("fan_max_" + (int)AsusFan.GPU, defaultMax[(int)AsusFan.GPU]),
|
||||||
|
AppConfig.Get("fan_max_" + (int)AsusFan.Mid, defaultMax[(int)AsusFan.Mid])
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int[] GetDefaultMax()
|
||||||
|
{
|
||||||
|
if (AppConfig.ContainsModel("GA401I")) return new int[3] { 78, 76, DEFAULT_FAN_MAX };
|
||||||
|
if (AppConfig.ContainsModel("GA401")) return new int[3] { 71, 73, DEFAULT_FAN_MAX };
|
||||||
|
if (AppConfig.ContainsModel("GA402")) return new int[3] { 55, 56, DEFAULT_FAN_MAX };
|
||||||
|
|
||||||
|
if (AppConfig.ContainsModel("G513R")) return new int[3] { 58, 60, DEFAULT_FAN_MAX };
|
||||||
|
if (AppConfig.ContainsModel("G513Q")) return new int[3] { 69, 69, DEFAULT_FAN_MAX };
|
||||||
|
if (AppConfig.ContainsModel("GA503")) return new int[3] { 64, 64, DEFAULT_FAN_MAX };
|
||||||
|
|
||||||
|
if (AppConfig.ContainsModel("GU603")) return new int[3] { 62, 64, DEFAULT_FAN_MAX };
|
||||||
|
|
||||||
|
if (AppConfig.ContainsModel("FA507R")) return new int[3] { 63, 57, DEFAULT_FAN_MAX };
|
||||||
|
if (AppConfig.ContainsModel("FA507X")) return new int[3] { 63, 68, DEFAULT_FAN_MAX };
|
||||||
|
|
||||||
|
if (AppConfig.ContainsModel("GX650")) return new int[3] { 62, 62, DEFAULT_FAN_MAX };
|
||||||
|
|
||||||
|
if (AppConfig.ContainsModel("G732")) return new int[3] { 61, 60, DEFAULT_FAN_MAX };
|
||||||
|
if (AppConfig.ContainsModel("G713")) return new int[3] { 56, 60, DEFAULT_FAN_MAX };
|
||||||
|
|
||||||
|
if (AppConfig.ContainsModel("Z301")) return new int[3] { 72, 64, DEFAULT_FAN_MAX };
|
||||||
|
|
||||||
|
if (AppConfig.ContainsModel("GV601")) return new int[3] { 78, 59, 85 };
|
||||||
|
|
||||||
|
return new int[3] { DEFAULT_FAN_MAX, DEFAULT_FAN_MAX, DEFAULT_FAN_MAX };
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
return _fanMax[(int)device];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetFanMax(AsusFan device, int value)
|
||||||
|
{
|
||||||
|
_fanMax[(int)device] = value;
|
||||||
|
AppConfig.Set("fan_max_" + (int)device, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool fanRpm
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _fanRpm;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
AppConfig.Set("fan_rpm", value ? 1 : 0);
|
||||||
|
_fanRpm = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string FormatFan(AsusFan device, int value)
|
||||||
|
{
|
||||||
|
if (value < 0) return null;
|
||||||
|
|
||||||
|
if (value > GetFanMax(device) && value <= INADEQUATE_MAX) SetFanMax(device, value);
|
||||||
|
|
||||||
|
if (fanRpm)
|
||||||
|
return Properties.Strings.FanSpeed + ": " + (value * 100).ToString() + "RPM";
|
||||||
|
else
|
||||||
|
return Properties.Strings.FanSpeed + ": " + Math.Min(Math.Round((float)value / GetFanMax(device) * 100), 100).ToString() + "%"; // relatively to max RPM
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartCalibration()
|
||||||
|
{
|
||||||
|
|
||||||
|
measuredMax = new int[] { 0, 0, 0 };
|
||||||
|
timer.Enabled = true;
|
||||||
|
|
||||||
|
for (int i = 0; i < FAN_COUNT; i++)
|
||||||
|
AppConfig.Remove("fan_max_" + i);
|
||||||
|
|
||||||
|
Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AsusACPI.PerformanceTurbo, "ModeCalibration");
|
||||||
|
|
||||||
|
for (int i = 0; i < FAN_COUNT; i++)
|
||||||
|
Program.acpi.SetFanCurve((AsusFan)i, new byte[] { 20, 30, 40, 50, 60, 70, 80, 90, 100, 100, 100, 100, 100, 100, 100, 100 });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e)
|
||||||
|
{
|
||||||
|
int fan;
|
||||||
|
bool same = true;
|
||||||
|
|
||||||
|
for (int i = 0; i < FAN_COUNT; i++)
|
||||||
|
{
|
||||||
|
fan = Program.acpi.GetFan((AsusFan)i);
|
||||||
|
if (fan > measuredMax[i])
|
||||||
|
{
|
||||||
|
measuredMax[i] = fan;
|
||||||
|
same = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (same) sameCount++;
|
||||||
|
else sameCount = 0;
|
||||||
|
|
||||||
|
string label = "Measuring Max Speed - CPU: " + measuredMax[(int)AsusFan.CPU] * 100 + ", GPU: " + measuredMax[(int)AsusFan.GPU] * 100;
|
||||||
|
if (measuredMax[(int)AsusFan.Mid] > 10) label = label + ", Mid: " + measuredMax[(int)AsusFan.Mid] * 100;
|
||||||
|
label = label + " (" + sameCount + "s)";
|
||||||
|
|
||||||
|
fansForm.LabelFansResult(label);
|
||||||
|
|
||||||
|
if (sameCount >= 15)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < FAN_COUNT; i++)
|
||||||
|
{
|
||||||
|
if (measuredMax[i] > 30 && measuredMax[i] < INADEQUATE_MAX) SetFanMax((AsusFan)i, measuredMax[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
sameCount = 0;
|
||||||
|
FinishCalibration();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FinishCalibration()
|
||||||
|
{
|
||||||
|
|
||||||
|
timer.Enabled = false;
|
||||||
|
modeControl.SetPerformanceMode();
|
||||||
|
|
||||||
|
string label = "Measured - CPU: " + AppConfig.Get("fan_max_" + (int)AsusFan.CPU) * 100;
|
||||||
|
|
||||||
|
if (AppConfig.Get("fan_max_" + (int)AsusFan.GPU) > 0)
|
||||||
|
label = label + ", GPU: " + AppConfig.Get("fan_max_" + (int)AsusFan.GPU) * 100;
|
||||||
|
|
||||||
|
if (AppConfig.Get("fan_max_" + (int)AsusFan.Mid) > 0)
|
||||||
|
label = label + ", Mid: " + AppConfig.Get("fan_max_" + (int)AsusFan.Mid) * 100;
|
||||||
|
|
||||||
|
fansForm.LabelFansResult(label);
|
||||||
|
fansForm.InitAxis();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
211
app/Fans.Designer.cs
generated
211
app/Fans.Designer.cs
generated
@@ -31,14 +31,14 @@ namespace GHelper
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
ChartArea chartArea9 = new ChartArea();
|
ChartArea chartArea1 = new ChartArea();
|
||||||
Title title9 = new Title();
|
Title title1 = new Title();
|
||||||
ChartArea chartArea10 = new ChartArea();
|
ChartArea chartArea2 = new ChartArea();
|
||||||
Title title10 = new Title();
|
Title title2 = new Title();
|
||||||
ChartArea chartArea11 = new ChartArea();
|
ChartArea chartArea3 = new ChartArea();
|
||||||
Title title11 = new Title();
|
Title title3 = new Title();
|
||||||
ChartArea chartArea12 = new ChartArea();
|
ChartArea chartArea4 = new ChartArea();
|
||||||
Title title12 = new Title();
|
Title title4 = new Title();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans));
|
||||||
panelFans = new Panel();
|
panelFans = new Panel();
|
||||||
labelTip = new Label();
|
labelTip = new Label();
|
||||||
@@ -55,6 +55,7 @@ namespace GHelper
|
|||||||
picturePerf = new PictureBox();
|
picturePerf = new PictureBox();
|
||||||
labelFans = new Label();
|
labelFans = new Label();
|
||||||
panelApplyFans = new Panel();
|
panelApplyFans = new Panel();
|
||||||
|
buttonCalibrate = new RButton();
|
||||||
labelFansResult = new Label();
|
labelFansResult = new Label();
|
||||||
checkApplyFans = new RCheckBox();
|
checkApplyFans = new RCheckBox();
|
||||||
buttonReset = new RButton();
|
buttonReset = new RButton();
|
||||||
@@ -128,6 +129,10 @@ namespace GHelper
|
|||||||
labelGPUCore = new Label();
|
labelGPUCore = new Label();
|
||||||
trackGPUCore = new TrackBar();
|
trackGPUCore = new TrackBar();
|
||||||
labelGPUCoreTitle = new Label();
|
labelGPUCoreTitle = new Label();
|
||||||
|
panelGPUClockLimit = new Panel();
|
||||||
|
labelGPUClockLimit = new Label();
|
||||||
|
trackGPUClockLimit = new TrackBar();
|
||||||
|
labelGPUClockLimitTitle = new Label();
|
||||||
panelTitleGPU = new Panel();
|
panelTitleGPU = new Panel();
|
||||||
pictureGPU = new PictureBox();
|
pictureGPU = new PictureBox();
|
||||||
labelGPU = new Label();
|
labelGPU = new Label();
|
||||||
@@ -136,10 +141,6 @@ namespace GHelper
|
|||||||
buttonAdvanced = new RButton();
|
buttonAdvanced = new RButton();
|
||||||
buttonGPU = new RButton();
|
buttonGPU = new RButton();
|
||||||
buttonCPU = new RButton();
|
buttonCPU = new RButton();
|
||||||
panelGPUClockLimit = new Panel();
|
|
||||||
labelGPUClockLimit = new Label();
|
|
||||||
trackGPUClockLimit = new TrackBar();
|
|
||||||
labelGPUClockLimitTitle = new Label();
|
|
||||||
panelFans.SuspendLayout();
|
panelFans.SuspendLayout();
|
||||||
tableFanCharts.SuspendLayout();
|
tableFanCharts.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit();
|
((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit();
|
||||||
@@ -188,12 +189,12 @@ namespace GHelper
|
|||||||
((System.ComponentModel.ISupportInitialize)trackGPUMemory).BeginInit();
|
((System.ComponentModel.ISupportInitialize)trackGPUMemory).BeginInit();
|
||||||
panelGPUCore.SuspendLayout();
|
panelGPUCore.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)trackGPUCore).BeginInit();
|
((System.ComponentModel.ISupportInitialize)trackGPUCore).BeginInit();
|
||||||
|
panelGPUClockLimit.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)trackGPUClockLimit).BeginInit();
|
||||||
panelTitleGPU.SuspendLayout();
|
panelTitleGPU.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit();
|
((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit();
|
||||||
panelNav.SuspendLayout();
|
panelNav.SuspendLayout();
|
||||||
tableNav.SuspendLayout();
|
tableNav.SuspendLayout();
|
||||||
panelGPUClockLimit.SuspendLayout();
|
|
||||||
((System.ComponentModel.ISupportInitialize)trackGPUClockLimit).BeginInit();
|
|
||||||
SuspendLayout();
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// panelFans
|
// panelFans
|
||||||
@@ -239,7 +240,7 @@ namespace GHelper
|
|||||||
tableFanCharts.Location = new Point(0, 66);
|
tableFanCharts.Location = new Point(0, 66);
|
||||||
tableFanCharts.Margin = new Padding(4);
|
tableFanCharts.Margin = new Padding(4);
|
||||||
tableFanCharts.Name = "tableFanCharts";
|
tableFanCharts.Name = "tableFanCharts";
|
||||||
tableFanCharts.Padding = new Padding(10, 0, 10, 10);
|
tableFanCharts.Padding = new Padding(10, 0, 10, 5);
|
||||||
tableFanCharts.RowCount = 2;
|
tableFanCharts.RowCount = 2;
|
||||||
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 25F));
|
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 25F));
|
||||||
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 25F));
|
tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 25F));
|
||||||
@@ -250,60 +251,60 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
// chartGPU
|
// chartGPU
|
||||||
//
|
//
|
||||||
chartArea9.Name = "ChartArea1";
|
chartArea1.Name = "ChartArea1";
|
||||||
chartGPU.ChartAreas.Add(chartArea9);
|
chartGPU.ChartAreas.Add(chartArea1);
|
||||||
chartGPU.Dock = DockStyle.Fill;
|
chartGPU.Dock = DockStyle.Fill;
|
||||||
chartGPU.Location = new Point(12, 491);
|
chartGPU.Location = new Point(12, 493);
|
||||||
chartGPU.Margin = new Padding(2, 10, 2, 10);
|
chartGPU.Margin = new Padding(2, 10, 2, 10);
|
||||||
chartGPU.Name = "chartGPU";
|
chartGPU.Name = "chartGPU";
|
||||||
chartGPU.Size = new Size(782, 461);
|
chartGPU.Size = new Size(782, 463);
|
||||||
chartGPU.TabIndex = 17;
|
chartGPU.TabIndex = 17;
|
||||||
chartGPU.Text = "chartGPU";
|
chartGPU.Text = "chartGPU";
|
||||||
title9.Name = "Title1";
|
title1.Name = "Title1";
|
||||||
chartGPU.Titles.Add(title9);
|
chartGPU.Titles.Add(title1);
|
||||||
//
|
//
|
||||||
// chartCPU
|
// chartCPU
|
||||||
//
|
//
|
||||||
chartArea10.Name = "ChartArea1";
|
chartArea2.Name = "ChartArea1";
|
||||||
chartCPU.ChartAreas.Add(chartArea10);
|
chartCPU.ChartAreas.Add(chartArea2);
|
||||||
chartCPU.Dock = DockStyle.Fill;
|
chartCPU.Dock = DockStyle.Fill;
|
||||||
chartCPU.Location = new Point(12, 10);
|
chartCPU.Location = new Point(12, 10);
|
||||||
chartCPU.Margin = new Padding(2, 10, 2, 10);
|
chartCPU.Margin = new Padding(2, 10, 2, 10);
|
||||||
chartCPU.Name = "chartCPU";
|
chartCPU.Name = "chartCPU";
|
||||||
chartCPU.Size = new Size(782, 461);
|
chartCPU.Size = new Size(782, 463);
|
||||||
chartCPU.TabIndex = 14;
|
chartCPU.TabIndex = 14;
|
||||||
chartCPU.Text = "chartCPU";
|
chartCPU.Text = "chartCPU";
|
||||||
title10.Name = "Title1";
|
title2.Name = "Title1";
|
||||||
chartCPU.Titles.Add(title10);
|
chartCPU.Titles.Add(title2);
|
||||||
//
|
//
|
||||||
// chartXGM
|
// chartXGM
|
||||||
//
|
//
|
||||||
chartArea11.Name = "ChartAreaXGM";
|
chartArea3.Name = "ChartAreaXGM";
|
||||||
chartXGM.ChartAreas.Add(chartArea11);
|
chartXGM.ChartAreas.Add(chartArea3);
|
||||||
chartXGM.Dock = DockStyle.Fill;
|
chartXGM.Dock = DockStyle.Fill;
|
||||||
chartXGM.Location = new Point(12, 1453);
|
chartXGM.Location = new Point(12, 1459);
|
||||||
chartXGM.Margin = new Padding(2, 10, 2, 10);
|
chartXGM.Margin = new Padding(2, 10, 2, 10);
|
||||||
chartXGM.Name = "chartXGM";
|
chartXGM.Name = "chartXGM";
|
||||||
chartXGM.Size = new Size(782, 464);
|
chartXGM.Size = new Size(782, 463);
|
||||||
chartXGM.TabIndex = 14;
|
chartXGM.TabIndex = 14;
|
||||||
chartXGM.Text = "chartXGM";
|
chartXGM.Text = "chartXGM";
|
||||||
title11.Name = "Title4";
|
title3.Name = "Title4";
|
||||||
chartXGM.Titles.Add(title11);
|
chartXGM.Titles.Add(title3);
|
||||||
chartXGM.Visible = false;
|
chartXGM.Visible = false;
|
||||||
//
|
//
|
||||||
// chartMid
|
// chartMid
|
||||||
//
|
//
|
||||||
chartArea12.Name = "ChartArea3";
|
chartArea4.Name = "ChartArea3";
|
||||||
chartMid.ChartAreas.Add(chartArea12);
|
chartMid.ChartAreas.Add(chartArea4);
|
||||||
chartMid.Dock = DockStyle.Fill;
|
chartMid.Dock = DockStyle.Fill;
|
||||||
chartMid.Location = new Point(12, 972);
|
chartMid.Location = new Point(12, 976);
|
||||||
chartMid.Margin = new Padding(2, 10, 2, 10);
|
chartMid.Margin = new Padding(2, 10, 2, 10);
|
||||||
chartMid.Name = "chartMid";
|
chartMid.Name = "chartMid";
|
||||||
chartMid.Size = new Size(782, 461);
|
chartMid.Size = new Size(782, 463);
|
||||||
chartMid.TabIndex = 14;
|
chartMid.TabIndex = 14;
|
||||||
chartMid.Text = "chartMid";
|
chartMid.Text = "chartMid";
|
||||||
title12.Name = "Title3";
|
title4.Name = "Title3";
|
||||||
chartMid.Titles.Add(title12);
|
chartMid.Titles.Add(title4);
|
||||||
chartMid.Visible = false;
|
chartMid.Visible = false;
|
||||||
//
|
//
|
||||||
// panelTitleFans
|
// panelTitleFans
|
||||||
@@ -410,6 +411,7 @@ namespace GHelper
|
|||||||
//
|
//
|
||||||
// panelApplyFans
|
// panelApplyFans
|
||||||
//
|
//
|
||||||
|
panelApplyFans.Controls.Add(buttonCalibrate);
|
||||||
panelApplyFans.Controls.Add(labelFansResult);
|
panelApplyFans.Controls.Add(labelFansResult);
|
||||||
panelApplyFans.Controls.Add(checkApplyFans);
|
panelApplyFans.Controls.Add(checkApplyFans);
|
||||||
panelApplyFans.Controls.Add(buttonReset);
|
panelApplyFans.Controls.Add(buttonReset);
|
||||||
@@ -420,16 +422,32 @@ namespace GHelper
|
|||||||
panelApplyFans.Size = new Size(806, 116);
|
panelApplyFans.Size = new Size(806, 116);
|
||||||
panelApplyFans.TabIndex = 43;
|
panelApplyFans.TabIndex = 43;
|
||||||
//
|
//
|
||||||
|
// buttonCalibrate
|
||||||
|
//
|
||||||
|
buttonCalibrate.Activated = false;
|
||||||
|
buttonCalibrate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||||
|
buttonCalibrate.BackColor = SystemColors.ControlLight;
|
||||||
|
buttonCalibrate.BorderColor = Color.Transparent;
|
||||||
|
buttonCalibrate.BorderRadius = 2;
|
||||||
|
buttonCalibrate.FlatStyle = FlatStyle.Flat;
|
||||||
|
buttonCalibrate.Location = new Point(275, 40);
|
||||||
|
buttonCalibrate.Margin = new Padding(4, 2, 4, 2);
|
||||||
|
buttonCalibrate.Name = "buttonCalibrate";
|
||||||
|
buttonCalibrate.Secondary = true;
|
||||||
|
buttonCalibrate.Size = new Size(141, 50);
|
||||||
|
buttonCalibrate.TabIndex = 43;
|
||||||
|
buttonCalibrate.Text = "Calibrate";
|
||||||
|
buttonCalibrate.UseVisualStyleBackColor = false;
|
||||||
|
//
|
||||||
// labelFansResult
|
// labelFansResult
|
||||||
//
|
//
|
||||||
labelFansResult.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
labelFansResult.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;
|
||||||
labelFansResult.ForeColor = Color.Red;
|
labelFansResult.ForeColor = Color.Red;
|
||||||
labelFansResult.Location = new Point(24, 4);
|
labelFansResult.Location = new Point(18, 2);
|
||||||
labelFansResult.Margin = new Padding(4, 0, 4, 0);
|
labelFansResult.Margin = new Padding(4, 0, 4, 0);
|
||||||
labelFansResult.Name = "labelFansResult";
|
labelFansResult.Name = "labelFansResult";
|
||||||
labelFansResult.Size = new Size(762, 32);
|
labelFansResult.Size = new Size(771, 32);
|
||||||
labelFansResult.TabIndex = 42;
|
labelFansResult.TabIndex = 42;
|
||||||
labelFansResult.TextAlign = ContentAlignment.TopRight;
|
|
||||||
labelFansResult.Visible = false;
|
labelFansResult.Visible = false;
|
||||||
//
|
//
|
||||||
// checkApplyFans
|
// checkApplyFans
|
||||||
@@ -458,7 +476,7 @@ namespace GHelper
|
|||||||
buttonReset.Margin = new Padding(4, 2, 4, 2);
|
buttonReset.Margin = new Padding(4, 2, 4, 2);
|
||||||
buttonReset.Name = "buttonReset";
|
buttonReset.Name = "buttonReset";
|
||||||
buttonReset.Secondary = true;
|
buttonReset.Secondary = true;
|
||||||
buttonReset.Size = new Size(274, 50);
|
buttonReset.Size = new Size(252, 50);
|
||||||
buttonReset.TabIndex = 18;
|
buttonReset.TabIndex = 18;
|
||||||
buttonReset.Text = Properties.Strings.FactoryDefaults;
|
buttonReset.Text = Properties.Strings.FactoryDefaults;
|
||||||
buttonReset.UseVisualStyleBackColor = false;
|
buttonReset.UseVisualStyleBackColor = false;
|
||||||
@@ -1337,6 +1355,56 @@ namespace GHelper
|
|||||||
labelGPUCoreTitle.TabIndex = 17;
|
labelGPUCoreTitle.TabIndex = 17;
|
||||||
labelGPUCoreTitle.Text = "Core Clock Offset";
|
labelGPUCoreTitle.Text = "Core Clock Offset";
|
||||||
//
|
//
|
||||||
|
// panelGPUClockLimit
|
||||||
|
//
|
||||||
|
panelGPUClockLimit.AutoSize = true;
|
||||||
|
panelGPUClockLimit.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||||
|
panelGPUClockLimit.Controls.Add(labelGPUClockLimit);
|
||||||
|
panelGPUClockLimit.Controls.Add(trackGPUClockLimit);
|
||||||
|
panelGPUClockLimit.Controls.Add(labelGPUClockLimitTitle);
|
||||||
|
panelGPUClockLimit.Dock = DockStyle.Top;
|
||||||
|
panelGPUClockLimit.Location = new Point(0, 60);
|
||||||
|
panelGPUClockLimit.Margin = new Padding(4);
|
||||||
|
panelGPUClockLimit.MaximumSize = new Size(0, 124);
|
||||||
|
panelGPUClockLimit.Name = "panelGPUClockLimit";
|
||||||
|
panelGPUClockLimit.Size = new Size(520, 124);
|
||||||
|
panelGPUClockLimit.TabIndex = 48;
|
||||||
|
//
|
||||||
|
// labelGPUClockLimit
|
||||||
|
//
|
||||||
|
labelGPUClockLimit.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
||||||
|
labelGPUClockLimit.Location = new Point(326, 16);
|
||||||
|
labelGPUClockLimit.Margin = new Padding(4, 0, 4, 0);
|
||||||
|
labelGPUClockLimit.Name = "labelGPUClockLimit";
|
||||||
|
labelGPUClockLimit.Size = new Size(176, 32);
|
||||||
|
labelGPUClockLimit.TabIndex = 29;
|
||||||
|
labelGPUClockLimit.Text = "1500 MHz";
|
||||||
|
labelGPUClockLimit.TextAlign = ContentAlignment.TopRight;
|
||||||
|
//
|
||||||
|
// trackGPUClockLimit
|
||||||
|
//
|
||||||
|
trackGPUClockLimit.LargeChange = 100;
|
||||||
|
trackGPUClockLimit.Location = new Point(6, 48);
|
||||||
|
trackGPUClockLimit.Margin = new Padding(4, 2, 4, 2);
|
||||||
|
trackGPUClockLimit.Maximum = 3000;
|
||||||
|
trackGPUClockLimit.Name = "trackGPUClockLimit";
|
||||||
|
trackGPUClockLimit.RightToLeft = RightToLeft.No;
|
||||||
|
trackGPUClockLimit.Size = new Size(496, 90);
|
||||||
|
trackGPUClockLimit.SmallChange = 10;
|
||||||
|
trackGPUClockLimit.TabIndex = 18;
|
||||||
|
trackGPUClockLimit.TickFrequency = 50;
|
||||||
|
trackGPUClockLimit.TickStyle = TickStyle.TopLeft;
|
||||||
|
//
|
||||||
|
// labelGPUClockLimitTitle
|
||||||
|
//
|
||||||
|
labelGPUClockLimitTitle.AutoSize = true;
|
||||||
|
labelGPUClockLimitTitle.Location = new Point(10, 16);
|
||||||
|
labelGPUClockLimitTitle.Margin = new Padding(4, 0, 4, 0);
|
||||||
|
labelGPUClockLimitTitle.Name = "labelGPUClockLimitTitle";
|
||||||
|
labelGPUClockLimitTitle.Size = new Size(188, 32);
|
||||||
|
labelGPUClockLimitTitle.TabIndex = 17;
|
||||||
|
labelGPUClockLimitTitle.Text = "Core Clock Limit";
|
||||||
|
//
|
||||||
// panelTitleGPU
|
// panelTitleGPU
|
||||||
//
|
//
|
||||||
panelTitleGPU.AutoSize = true;
|
panelTitleGPU.AutoSize = true;
|
||||||
@@ -1459,56 +1527,6 @@ namespace GHelper
|
|||||||
buttonCPU.TextImageRelation = TextImageRelation.ImageBeforeText;
|
buttonCPU.TextImageRelation = TextImageRelation.ImageBeforeText;
|
||||||
buttonCPU.UseVisualStyleBackColor = false;
|
buttonCPU.UseVisualStyleBackColor = false;
|
||||||
//
|
//
|
||||||
// panelGPUClockLimit
|
|
||||||
//
|
|
||||||
panelGPUClockLimit.AutoSize = true;
|
|
||||||
panelGPUClockLimit.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
|
||||||
panelGPUClockLimit.Controls.Add(labelGPUClockLimit);
|
|
||||||
panelGPUClockLimit.Controls.Add(trackGPUClockLimit);
|
|
||||||
panelGPUClockLimit.Controls.Add(labelGPUClockLimitTitle);
|
|
||||||
panelGPUClockLimit.Dock = DockStyle.Top;
|
|
||||||
panelGPUClockLimit.Location = new Point(0, 60);
|
|
||||||
panelGPUClockLimit.Margin = new Padding(4);
|
|
||||||
panelGPUClockLimit.MaximumSize = new Size(0, 124);
|
|
||||||
panelGPUClockLimit.Name = "panelGPUClockLimit";
|
|
||||||
panelGPUClockLimit.Size = new Size(520, 124);
|
|
||||||
panelGPUClockLimit.TabIndex = 48;
|
|
||||||
//
|
|
||||||
// labelGPUClockLimit
|
|
||||||
//
|
|
||||||
labelGPUClockLimit.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point);
|
|
||||||
labelGPUClockLimit.Location = new Point(326, 16);
|
|
||||||
labelGPUClockLimit.Margin = new Padding(4, 0, 4, 0);
|
|
||||||
labelGPUClockLimit.Name = "labelGPUClockLimit";
|
|
||||||
labelGPUClockLimit.Size = new Size(176, 32);
|
|
||||||
labelGPUClockLimit.TabIndex = 29;
|
|
||||||
labelGPUClockLimit.Text = "1500 MHz";
|
|
||||||
labelGPUClockLimit.TextAlign = ContentAlignment.TopRight;
|
|
||||||
//
|
|
||||||
// trackGPUClockLimit
|
|
||||||
//
|
|
||||||
trackGPUClockLimit.LargeChange = 100;
|
|
||||||
trackGPUClockLimit.Location = new Point(6, 48);
|
|
||||||
trackGPUClockLimit.Margin = new Padding(4, 2, 4, 2);
|
|
||||||
trackGPUClockLimit.Maximum = 3000;
|
|
||||||
trackGPUClockLimit.Name = "trackGPUClockLimit";
|
|
||||||
trackGPUClockLimit.RightToLeft = RightToLeft.No;
|
|
||||||
trackGPUClockLimit.Size = new Size(496, 90);
|
|
||||||
trackGPUClockLimit.SmallChange = 10;
|
|
||||||
trackGPUClockLimit.TabIndex = 18;
|
|
||||||
trackGPUClockLimit.TickFrequency = 50;
|
|
||||||
trackGPUClockLimit.TickStyle = TickStyle.TopLeft;
|
|
||||||
//
|
|
||||||
// labelGPUClockLimitTitle
|
|
||||||
//
|
|
||||||
labelGPUClockLimitTitle.AutoSize = true;
|
|
||||||
labelGPUClockLimitTitle.Location = new Point(10, 16);
|
|
||||||
labelGPUClockLimitTitle.Margin = new Padding(4, 0, 4, 0);
|
|
||||||
labelGPUClockLimitTitle.Name = "labelGPUClockLimitTitle";
|
|
||||||
labelGPUClockLimitTitle.Size = new Size(188, 32);
|
|
||||||
labelGPUClockLimitTitle.TabIndex = 17;
|
|
||||||
labelGPUClockLimitTitle.Text = "Core Clock Limit";
|
|
||||||
//
|
|
||||||
// Fans
|
// Fans
|
||||||
//
|
//
|
||||||
AutoScaleDimensions = new SizeF(192F, 192F);
|
AutoScaleDimensions = new SizeF(192F, 192F);
|
||||||
@@ -1597,14 +1615,14 @@ namespace GHelper
|
|||||||
panelGPUCore.ResumeLayout(false);
|
panelGPUCore.ResumeLayout(false);
|
||||||
panelGPUCore.PerformLayout();
|
panelGPUCore.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)trackGPUCore).EndInit();
|
((System.ComponentModel.ISupportInitialize)trackGPUCore).EndInit();
|
||||||
|
panelGPUClockLimit.ResumeLayout(false);
|
||||||
|
panelGPUClockLimit.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)trackGPUClockLimit).EndInit();
|
||||||
panelTitleGPU.ResumeLayout(false);
|
panelTitleGPU.ResumeLayout(false);
|
||||||
panelTitleGPU.PerformLayout();
|
panelTitleGPU.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)pictureGPU).EndInit();
|
((System.ComponentModel.ISupportInitialize)pictureGPU).EndInit();
|
||||||
panelNav.ResumeLayout(false);
|
panelNav.ResumeLayout(false);
|
||||||
tableNav.ResumeLayout(false);
|
tableNav.ResumeLayout(false);
|
||||||
panelGPUClockLimit.ResumeLayout(false);
|
|
||||||
panelGPUClockLimit.PerformLayout();
|
|
||||||
((System.ComponentModel.ISupportInitialize)trackGPUClockLimit).EndInit();
|
|
||||||
ResumeLayout(false);
|
ResumeLayout(false);
|
||||||
PerformLayout();
|
PerformLayout();
|
||||||
}
|
}
|
||||||
@@ -1711,5 +1729,6 @@ namespace GHelper
|
|||||||
private Label labelGPUClockLimit;
|
private Label labelGPUClockLimit;
|
||||||
private TrackBar trackGPUClockLimit;
|
private TrackBar trackGPUClockLimit;
|
||||||
private Label labelGPUClockLimitTitle;
|
private Label labelGPUClockLimitTitle;
|
||||||
|
private RButton buttonCalibrate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
78
app/Fans.cs
78
app/Fans.cs
@@ -1,4 +1,5 @@
|
|||||||
using GHelper.Gpu.NVidia;
|
using GHelper.Fan;
|
||||||
|
using GHelper.Gpu.NVidia;
|
||||||
using GHelper.Mode;
|
using GHelper.Mode;
|
||||||
using GHelper.UI;
|
using GHelper.UI;
|
||||||
using Ryzen;
|
using Ryzen;
|
||||||
@@ -18,8 +19,6 @@ namespace GHelper
|
|||||||
Series seriesMid;
|
Series seriesMid;
|
||||||
Series seriesXGM;
|
Series seriesXGM;
|
||||||
|
|
||||||
static int MinRPM, MaxRPM;
|
|
||||||
|
|
||||||
static bool gpuVisible = true;
|
static bool gpuVisible = true;
|
||||||
static bool fanRpm = true;
|
static bool fanRpm = true;
|
||||||
|
|
||||||
@@ -28,11 +27,15 @@ namespace GHelper
|
|||||||
NvidiaGpuControl? nvControl = null;
|
NvidiaGpuControl? nvControl = null;
|
||||||
ModeControl modeControl = Program.modeControl;
|
ModeControl modeControl = Program.modeControl;
|
||||||
|
|
||||||
|
FanSensorControl fanSensorControl;
|
||||||
|
|
||||||
public Fans()
|
public Fans()
|
||||||
{
|
{
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
fanSensorControl = new FanSensorControl(this);
|
||||||
|
|
||||||
//float dpi = ControlHelper.GetDpiScale(this).Value;
|
//float dpi = ControlHelper.GetDpiScale(this).Value;
|
||||||
//comboModes.Size = new Size(comboModes.Width, (int)dpi * 18);
|
//comboModes.Size = new Size(comboModes.Width, (int)dpi * 18);
|
||||||
comboModes.ClientSize = new Size(comboModes.Width, comboModes.Height - 4);
|
comboModes.ClientSize = new Size(comboModes.Width, comboModes.Height - 4);
|
||||||
@@ -57,10 +60,10 @@ namespace GHelper
|
|||||||
buttonApplyAdvanced.Text = Properties.Strings.Apply;
|
buttonApplyAdvanced.Text = Properties.Strings.Apply;
|
||||||
checkApplyUV.Text = Properties.Strings.AutoApply;
|
checkApplyUV.Text = Properties.Strings.AutoApply;
|
||||||
|
|
||||||
|
buttonCalibrate.Text = Properties.Strings.Calibrate;
|
||||||
|
|
||||||
InitTheme(true);
|
InitTheme(true);
|
||||||
|
|
||||||
MinRPM = 18;
|
|
||||||
MaxRPM = HardwareControl.fanMax;
|
|
||||||
labelTip.Visible = false;
|
labelTip.Visible = false;
|
||||||
labelTip.BackColor = Color.Transparent;
|
labelTip.BackColor = Color.Transparent;
|
||||||
|
|
||||||
@@ -200,13 +203,24 @@ namespace GHelper
|
|||||||
|
|
||||||
checkApplyUV.Click += CheckApplyUV_Click;
|
checkApplyUV.Click += CheckApplyUV_Click;
|
||||||
|
|
||||||
|
buttonCalibrate.Click += ButtonCalibrate_Click;
|
||||||
|
|
||||||
ToggleNavigation(0);
|
ToggleNavigation(0);
|
||||||
|
|
||||||
|
if (Program.acpi.DeviceGet(AsusACPI.DevsCPUFanCurve) < 0) buttonCalibrate.Visible = false;
|
||||||
|
|
||||||
FormClosed += Fans_FormClosed;
|
FormClosed += Fans_FormClosed;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void ButtonCalibrate_Click(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
buttonCalibrate.Enabled = false;
|
||||||
|
fanSensorControl.StartCalibration();
|
||||||
|
}
|
||||||
|
|
||||||
private void ChartCPU_MouseClick(object? sender, MouseEventArgs e)
|
private void ChartCPU_MouseClick(object? sender, MouseEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is null) return;
|
if (sender is null) return;
|
||||||
@@ -571,15 +585,15 @@ namespace GHelper
|
|||||||
VisualiseGPUSettings();
|
VisualiseGPUSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
static string ChartPercToRPM(int percentage, AsusFan device, string unit = "")
|
static string ChartYLabel(int percentage, AsusFan device, string unit = "")
|
||||||
{
|
{
|
||||||
if (percentage == 0) return "OFF";
|
if (percentage == 0) return "OFF";
|
||||||
|
|
||||||
int Max = MaxRPM;
|
int Min = FanSensorControl.DEFAULT_FAN_MIN;
|
||||||
if (device == AsusFan.XGM) Max = 72;
|
int Max = FanSensorControl.GetFanMax(device);
|
||||||
|
|
||||||
if (fanRpm)
|
if (fanRpm)
|
||||||
return (200 * Math.Round((float)(MinRPM * 100 + (Max - MinRPM) * percentage) / 200)).ToString() + unit;
|
return (200 * Math.Round((float)(Min * 100 + (Max - Min) * percentage) / 200)).ToString() + unit;
|
||||||
else
|
else
|
||||||
return percentage + "%";
|
return percentage + "%";
|
||||||
}
|
}
|
||||||
@@ -589,12 +603,12 @@ namespace GHelper
|
|||||||
|
|
||||||
chart.ChartAreas[0].AxisY.CustomLabels.Clear();
|
chart.ChartAreas[0].AxisY.CustomLabels.Clear();
|
||||||
|
|
||||||
for (int i = 0; i <= fansMax - 10; i += 10)
|
for (int i = 0; i <= fansMax; i += 10)
|
||||||
{
|
{
|
||||||
chart.ChartAreas[0].AxisY.CustomLabels.Add(i - 2, i + 2, ChartPercToRPM(i, device));
|
chart.ChartAreas[0].AxisY.CustomLabels.Add(i - 2, i + 2, ChartYLabel(i, device));
|
||||||
}
|
}
|
||||||
|
|
||||||
chart.ChartAreas[0].AxisY.CustomLabels.Add(fansMax - 2, fansMax + 2, Properties.Strings.RPM);
|
//chart.ChartAreas[0].AxisY.CustomLabels.Add(fansMax -2, fansMax + 2, Properties.Strings.RPM);
|
||||||
chart.ChartAreas[0].AxisY.Interval = 10;
|
chart.ChartAreas[0].AxisY.Interval = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -602,20 +616,21 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
|
|
||||||
string title = "";
|
string title = "";
|
||||||
|
string scale = ", RPM/°C";
|
||||||
|
|
||||||
switch (device)
|
switch (device)
|
||||||
{
|
{
|
||||||
case AsusFan.CPU:
|
case AsusFan.CPU:
|
||||||
title = Properties.Strings.FanProfileCPU;
|
title = Properties.Strings.FanProfileCPU + scale;
|
||||||
break;
|
break;
|
||||||
case AsusFan.GPU:
|
case AsusFan.GPU:
|
||||||
title = Properties.Strings.FanProfileGPU;
|
title = Properties.Strings.FanProfileGPU + scale;
|
||||||
break;
|
break;
|
||||||
case AsusFan.Mid:
|
case AsusFan.Mid:
|
||||||
title = Properties.Strings.FanProfileMid;
|
title = Properties.Strings.FanProfileMid + scale;
|
||||||
break;
|
break;
|
||||||
case AsusFan.XGM:
|
case AsusFan.XGM:
|
||||||
title = "XG Mobile";
|
title = "XG Mobile" + scale;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -721,16 +736,34 @@ namespace GHelper
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void InitAxis()
|
||||||
|
{
|
||||||
|
if (this == null || this.Text == "") return;
|
||||||
|
|
||||||
|
Invoke(delegate
|
||||||
|
{
|
||||||
|
buttonCalibrate.Enabled = true;
|
||||||
|
SetAxis(chartCPU, AsusFan.CPU);
|
||||||
|
SetAxis(chartGPU, AsusFan.GPU);
|
||||||
|
if (chartMid.Visible) SetAxis(chartMid, AsusFan.Mid);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public void LabelFansResult(string text)
|
public void LabelFansResult(string text)
|
||||||
{
|
{
|
||||||
labelFansResult.Text = text;
|
if (text.Length > 0) Logger.WriteLine(text);
|
||||||
labelFansResult.Visible = (text.Length > 0);
|
|
||||||
|
if (this == null || this.Text == "") return;
|
||||||
|
|
||||||
|
Invoke(delegate
|
||||||
|
{
|
||||||
|
labelFansResult.Text = text;
|
||||||
|
labelFansResult.Visible = (text.Length > 0);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Fans_FormClosing(object? sender, FormClosingEventArgs e)
|
private void Fans_FormClosing(object? sender, FormClosingEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (e.CloseReason == CloseReason.UserClosing)
|
if (e.CloseReason == CloseReason.UserClosing)
|
||||||
{
|
{
|
||||||
@@ -994,7 +1027,6 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
curPoint = null;
|
curPoint = null;
|
||||||
curIndex = -1;
|
curIndex = -1;
|
||||||
|
|
||||||
labelTip.Visible = false;
|
labelTip.Visible = false;
|
||||||
|
|
||||||
SaveProfile(seriesCPU, AsusFan.CPU);
|
SaveProfile(seriesCPU, AsusFan.CPU);
|
||||||
@@ -1017,7 +1049,9 @@ namespace GHelper
|
|||||||
|
|
||||||
private void ChartCPU_MouseLeave(object? sender, EventArgs e)
|
private void ChartCPU_MouseLeave(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Chart_Save();
|
curPoint = null;
|
||||||
|
curIndex = -1;
|
||||||
|
labelTip.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ChartCPU_MouseMove(object? sender, MouseEventArgs e, AsusFan device)
|
private void ChartCPU_MouseMove(object? sender, MouseEventArgs e, AsusFan device)
|
||||||
@@ -1081,7 +1115,7 @@ namespace GHelper
|
|||||||
tip = true;
|
tip = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
labelTip.Text = Math.Round(curPoint.XValue) + "C, " + ChartPercToRPM((int)curPoint.YValues[0], device, " " + Properties.Strings.RPM);
|
labelTip.Text = Math.Round(curPoint.XValue) + "C, " + ChartYLabel((int)curPoint.YValues[0], device, " " + Properties.Strings.RPM);
|
||||||
labelTip.Top = e.Y + ((Control)sender).Top;
|
labelTip.Top = e.Y + ((Control)sender).Top;
|
||||||
labelTip.Left = e.X - 50;
|
labelTip.Left = e.X - 50;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
<AssemblyVersion>0.120</AssemblyVersion>
|
<AssemblyVersion>0.123</AssemblyVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
|||||||
@@ -44,9 +44,7 @@ namespace GHelper.Gpu
|
|||||||
// GPU mode not supported
|
// GPU mode not supported
|
||||||
if (eco < 0 && mux < 0)
|
if (eco < 0 && mux < 0)
|
||||||
{
|
{
|
||||||
if (gpuExists is null)
|
if (gpuExists is null) gpuExists = Program.acpi.GetFan(AsusFan.GPU) >= 0;
|
||||||
gpuExists = HardwareControl.FormatFan(Program.acpi.DeviceGet(AsusACPI.GPU_Fan)) is not null;
|
|
||||||
|
|
||||||
settings.HideGPUModes((bool)gpuExists);
|
settings.HideGPUModes((bool)gpuExists);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using GHelper;
|
using GHelper;
|
||||||
|
using GHelper.Fan;
|
||||||
using GHelper.Gpu;
|
using GHelper.Gpu;
|
||||||
using GHelper.Gpu.NVidia;
|
using GHelper.Gpu.NVidia;
|
||||||
using GHelper.Gpu.AMD;
|
using GHelper.Gpu.AMD;
|
||||||
@@ -10,9 +11,6 @@ using System.Management;
|
|||||||
public static class HardwareControl
|
public static class HardwareControl
|
||||||
{
|
{
|
||||||
|
|
||||||
const int DEFAULT_FAN_MAX = 58;
|
|
||||||
const int INADEQUATE_MAX = 80;
|
|
||||||
|
|
||||||
public static IGpuControl? GpuControl;
|
public static IGpuControl? GpuControl;
|
||||||
|
|
||||||
public static float? cpuTemp = -1;
|
public static float? cpuTemp = -1;
|
||||||
@@ -35,65 +33,6 @@ public static class HardwareControl
|
|||||||
|
|
||||||
static long lastUpdate;
|
static long lastUpdate;
|
||||||
|
|
||||||
static int _fanMax = DEFAULT_FAN_MAX;
|
|
||||||
static bool _fanRpm = false;
|
|
||||||
|
|
||||||
public static int fanMax
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _fanMax;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
AppConfig.Set("fan_max", value);
|
|
||||||
_fanMax = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool fanRpm
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _fanRpm;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
AppConfig.Set("fan_rpm", value ? 1 : 0);
|
|
||||||
_fanRpm = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static HardwareControl()
|
|
||||||
{
|
|
||||||
_fanMax = AppConfig.Get("fan_max");
|
|
||||||
if (_fanMax > INADEQUATE_MAX) _fanMax = -1; // skipping inadvequate settings
|
|
||||||
|
|
||||||
if (_fanMax < 0 && AppConfig.ContainsModel("401")) _fanMax = 72;
|
|
||||||
if (_fanMax < 0 && AppConfig.ContainsModel("503")) _fanMax = 68;
|
|
||||||
if (_fanMax < 0) _fanMax = DEFAULT_FAN_MAX;
|
|
||||||
|
|
||||||
_fanRpm = AppConfig.IsNotFalse("fan_rpm");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string FormatFan(int fan)
|
|
||||||
{
|
|
||||||
// fix for old models
|
|
||||||
if (fan < 0)
|
|
||||||
{
|
|
||||||
fan += 65536;
|
|
||||||
if (fan <= 0 || fan > 100) return null; //nothing reasonable
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fan > fanMax && fan <= INADEQUATE_MAX) fanMax = fan;
|
|
||||||
|
|
||||||
if (fanRpm)
|
|
||||||
return GHelper.Properties.Strings.FanSpeed + ": " + (fan * 100).ToString() + "RPM";
|
|
||||||
else
|
|
||||||
return GHelper.Properties.Strings.FanSpeed + ": " + Math.Min(Math.Round((float)fan / fanMax * 100), 100).ToString() + "%"; // relatively to 6000 rpm
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int GetGpuUse()
|
private static int GetGpuUse()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -246,9 +185,9 @@ public static class HardwareControl
|
|||||||
gpuTemp = -1;
|
gpuTemp = -1;
|
||||||
gpuUse = -1;
|
gpuUse = -1;
|
||||||
|
|
||||||
cpuFan = FormatFan(Program.acpi.DeviceGet(AsusACPI.CPU_Fan));
|
cpuFan = FanSensorControl.FormatFan(AsusFan.CPU, Program.acpi.GetFan(AsusFan.CPU));
|
||||||
gpuFan = FormatFan(Program.acpi.DeviceGet(AsusACPI.GPU_Fan));
|
gpuFan = FanSensorControl.FormatFan(AsusFan.GPU, Program.acpi.GetFan(AsusFan.GPU));
|
||||||
midFan = FormatFan(Program.acpi.DeviceGet(AsusACPI.Mid_Fan));
|
midFan = FanSensorControl.FormatFan(AsusFan.Mid, Program.acpi.GetFan(AsusFan.Mid));
|
||||||
|
|
||||||
cpuTemp = GetCPUTemp();
|
cpuTemp = GetCPUTemp();
|
||||||
|
|
||||||
@@ -328,6 +267,7 @@ public static class HardwareControl
|
|||||||
if (_gpuControl.IsValid)
|
if (_gpuControl.IsValid)
|
||||||
{
|
{
|
||||||
GpuControl = _gpuControl;
|
GpuControl = _gpuControl;
|
||||||
|
if (GpuControl.FullName.Contains("6850M")) AppConfig.Set("xgm_special", 1);
|
||||||
Logger.WriteLine(GpuControl.FullName);
|
Logger.WriteLine(GpuControl.FullName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -599,9 +599,7 @@ namespace GHelper.Input
|
|||||||
public static void SetBacklightAuto(bool init = false)
|
public static void SetBacklightAuto(bool init = false)
|
||||||
{
|
{
|
||||||
if (init) AsusUSB.Init();
|
if (init) AsusUSB.Init();
|
||||||
|
AsusUSB.ApplyBrightness(GetBacklight(), "Auto", init);
|
||||||
//if (!OptimizationService.IsRunning())
|
|
||||||
AsusUSB.ApplyBrightness(GetBacklight(), "Auto");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetBacklight(int delta, bool force = false)
|
public static void SetBacklight(int delta, bool force = false)
|
||||||
@@ -677,11 +675,14 @@ namespace GHelper.Input
|
|||||||
|
|
||||||
//string executable = command.Split(' ')[0];
|
//string executable = command.Split(' ')[0];
|
||||||
//string arguments = command.Substring(executable.Length).Trim();
|
//string arguments = command.Substring(executable.Length).Trim();
|
||||||
|
ProcessStartInfo startInfo = new ProcessStartInfo("cmd", "/C " + command);
|
||||||
|
|
||||||
|
startInfo.RedirectStandardOutput = true;
|
||||||
|
startInfo.RedirectStandardError = true;
|
||||||
|
startInfo.UseShellExecute = false;
|
||||||
|
startInfo.CreateNoWindow = true;
|
||||||
|
|
||||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
|
||||||
startInfo.UseShellExecute = true;
|
|
||||||
startInfo.WorkingDirectory = Environment.CurrentDirectory;
|
startInfo.WorkingDirectory = Environment.CurrentDirectory;
|
||||||
startInfo.FileName = command;
|
|
||||||
//startInfo.Arguments = arguments;
|
//startInfo.Arguments = arguments;
|
||||||
Process proc = Process.Start(startInfo);
|
Process proc = Process.Start(startInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
18
app/Properties/Strings.Designer.cs
generated
18
app/Properties/Strings.Designer.cs
generated
@@ -483,6 +483,15 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Boot Sound.
|
||||||
|
/// </summary>
|
||||||
|
internal static string BootSound {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("BootSound", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Brightness.
|
/// Looks up a localized string similar to Brightness.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -510,6 +519,15 @@ namespace GHelper.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Calibrate.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Calibrate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Calibrate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Charging.
|
/// Looks up a localized string similar to Charging.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Hochfahren</value>
|
<value>Hochfahren</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Helligkeit</value>
|
<value>Helligkeit</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Helligkeit erhöhen</value>
|
<value>Helligkeit erhöhen</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Lädt</value>
|
<value>Lädt</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Al arrancar</value>
|
<value>Al arrancar</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Brillo</value>
|
<value>Brillo</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Subir brillo</value>
|
<value>Subir brillo</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Cargando</value>
|
<value>Cargando</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Au démarrage</value>
|
<value>Au démarrage</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Luminosité</value>
|
<value>Luminosité</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Augmenter la luminosité</value>
|
<value>Augmenter la luminosité</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Chargement en cours</value>
|
<value>Chargement en cours</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Rendszerbetöltés</value>
|
<value>Rendszerbetöltés</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Fényerő</value>
|
<value>Fényerő</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Fényerő növelése</value>
|
<value>Fényerő növelése</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Charging</value>
|
<value>Charging</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Avvio</value>
|
<value>Avvio</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Luminosità</value>
|
<value>Luminosità</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Aumenta Luminosità</value>
|
<value>Aumenta Luminosità</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>In carica</value>
|
<value>In carica</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>부팅</value>
|
<value>부팅</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>밝기</value>
|
<value>밝기</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>밝기 증가</value>
|
<value>밝기 증가</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>충전 중</value>
|
<value>충전 중</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Paleidimas</value>
|
<value>Paleidimas</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Paleidimo garsas</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Ryškumas</value>
|
<value>Ryškumas</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Ryškumo didinimas</value>
|
<value>Ryškumo didinimas</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Kalibruoti</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Įkrovimas</value>
|
<value>Įkrovimas</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Uruchamianie</value>
|
<value>Uruchamianie</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Dźwięk podczas rozruchu</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Jasność</value>
|
<value>Jasność</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Zwiększ jasność</value>
|
<value>Zwiększ jasność</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Kalibruj</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Ładowanie</value>
|
<value>Ładowanie</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Ao ligar</value>
|
<value>Ao ligar</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Nível do brilho</value>
|
<value>Nível do brilho</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Brightness Up</value>
|
<value>Brightness Up</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Charging</value>
|
<value>Charging</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Ao ligar</value>
|
<value>Ao ligar</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Nível do brilho</value>
|
<value>Nível do brilho</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Aumentar o brilho</value>
|
<value>Aumentar o brilho</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Carregando</value>
|
<value>Carregando</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Boot</value>
|
<value>Boot</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Brightness</value>
|
<value>Brightness</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Brightness Up</value>
|
<value>Brightness Up</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Charging</value>
|
<value>Charging</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Pornire</value>
|
<value>Pornire</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Luminozitate</value>
|
<value>Luminozitate</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Mărirea luminozității</value>
|
<value>Mărirea luminozității</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Se încarcă</value>
|
<value>Se încarcă</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Önyükleme</value>
|
<value>Önyükleme</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Parlaklığı</value>
|
<value>Parlaklığı</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Brightness Up</value>
|
<value>Brightness Up</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Charging</value>
|
<value>Charging</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Старт</value>
|
<value>Старт</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Яскравість</value>
|
<value>Яскравість</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Підвищити яскравість</value>
|
<value>Підвищити яскравість</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Зарядка</value>
|
<value>Зарядка</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>Khởi động</value>
|
<value>Khởi động</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>Boot Sound</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>Độ sáng</value>
|
<value>Độ sáng</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>Tăng độ sáng</value>
|
<value>Tăng độ sáng</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>Đang sạc</value>
|
<value>Đang sạc</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>开机时</value>
|
<value>开机时</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>开机音效</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>亮度</value>
|
<value>亮度</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -267,6 +270,9 @@
|
|||||||
<data name="BrightnessUp" xml:space="preserve">
|
<data name="BrightnessUp" xml:space="preserve">
|
||||||
<value>提高亮度</value>
|
<value>提高亮度</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Calibrate" xml:space="preserve">
|
||||||
|
<value>Calibrate</value>
|
||||||
|
</data>
|
||||||
<data name="Charging" xml:space="preserve">
|
<data name="Charging" xml:space="preserve">
|
||||||
<value>充电中</value>
|
<value>充电中</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -258,6 +258,9 @@
|
|||||||
<data name="Boot" xml:space="preserve">
|
<data name="Boot" xml:space="preserve">
|
||||||
<value>開機時</value>
|
<value>開機時</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="BootSound" xml:space="preserve">
|
||||||
|
<value>開機音效</value>
|
||||||
|
</data>
|
||||||
<data name="Brightness" xml:space="preserve">
|
<data name="Brightness" xml:space="preserve">
|
||||||
<value>亮度</value>
|
<value>亮度</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using GHelper.AutoUpdate;
|
using GHelper.AutoUpdate;
|
||||||
using GHelper.Battery;
|
using GHelper.Battery;
|
||||||
using GHelper.Display;
|
using GHelper.Display;
|
||||||
|
using GHelper.Fan;
|
||||||
using GHelper.Gpu;
|
using GHelper.Gpu;
|
||||||
using GHelper.Helpers;
|
using GHelper.Helpers;
|
||||||
using GHelper.Input;
|
using GHelper.Input;
|
||||||
@@ -563,7 +564,7 @@ namespace GHelper
|
|||||||
|
|
||||||
private void LabelCPUFan_Click(object? sender, EventArgs e)
|
private void LabelCPUFan_Click(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
HardwareControl.fanRpm = !HardwareControl.fanRpm;
|
FanSensorControl.fanRpm = !FanSensorControl.fanRpm;
|
||||||
RefreshSensors(true);
|
RefreshSensors(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ namespace GHelper
|
|||||||
foreach (var localVersion in localVersions)
|
foreach (var localVersion in localVersions)
|
||||||
{
|
{
|
||||||
newer = Math.Min(newer, new Version(driver.version).CompareTo(new Version(localVersion)));
|
newer = Math.Min(newer, new Version(driver.version).CompareTo(new Version(localVersion)));
|
||||||
Logger.WriteLine(driver.title + " " + driver.version + " vs " + localVersion + " = " + newer);
|
Logger.WriteLine(driver.title + " " + deviceID + " "+ driver.version + " vs " + localVersion + " = " + newer);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user