Compare commits

..

50 Commits

Author SHA1 Message Date
Serge
4dd9daa95c Version Bump 2023-09-11 14:34:23 +02:00
Serge
10db075ece Custom command arguments https://github.com/seerge/g-helper/issues/1292 2023-09-11 12:03:52 +02:00
Serge
a800eae020 Pre-entered max fan speeds 2023-09-10 12:31:18 +02:00
Serge
eb21fb2020 Backlight init delay 2023-09-09 17:01:02 +02:00
Serge
600e6a9404 Cleanup 2023-09-09 14:27:43 +02:00
Serge
4b0fbcbf10 Cleanup 2023-09-09 13:52:29 +02:00
Serge
215aec34b9 Merge branch 'main' of https://github.com/seerge/g-helper 2023-09-09 13:07:57 +02:00
Serge
9cba686a3c Fan Calibration 2023-09-09 13:07:55 +02:00
Serge
43a7eb8b32 Merge pull request #1284 from seerge/l10n_main
New Crowdin updates
2023-09-09 12:40:55 +02:00
Serge
08eb867ae7 New translations Strings.resx (Lithuanian) 2023-09-09 10:32:25 +02:00
Serge
5c59c34a6c Merge pull request #1278 from seerge/l10n_main
New Crowdin updates
2023-09-09 00:48:26 +02:00
Serge
ae2dae8a97 New translations Strings.resx (Portuguese, Brazilian) 2023-09-08 23:12:31 +02:00
Serge
c06969ba8f New translations Strings.resx (Vietnamese) 2023-09-08 23:12:31 +02:00
Serge
496d55f88b New translations Strings.resx (Chinese Simplified) 2023-09-08 23:12:30 +02:00
Serge
2b16372ec4 New translations Strings.resx (Ukrainian) 2023-09-08 23:12:29 +02:00
Serge
041aa40a6d New translations Strings.resx (Turkish) 2023-09-08 23:12:28 +02:00
Serge
55c1dd7e16 New translations Strings.resx (Portuguese) 2023-09-08 23:12:27 +02:00
Serge
2ec2f669fb New translations Strings.resx (Polish) 2023-09-08 23:12:26 +02:00
Serge
17ea6157a6 New translations Strings.resx (Lithuanian) 2023-09-08 23:12:25 +02:00
Serge
d5bdf180a8 New translations Strings.resx (Korean) 2023-09-08 23:12:24 +02:00
Serge
a7d5ac5de9 New translations Strings.resx (Italian) 2023-09-08 23:12:24 +02:00
Serge
b103623099 New translations Strings.resx (Hungarian) 2023-09-08 23:12:23 +02:00
Serge
751f4d0331 New translations Strings.resx (German) 2023-09-08 23:12:22 +02:00
Serge
1f536d8d84 New translations Strings.resx (Spanish) 2023-09-08 23:12:21 +02:00
Serge
c900121644 New translations Strings.resx (French) 2023-09-08 23:12:20 +02:00
Serge
9ce038fe19 New translations Strings.resx (Romanian) 2023-09-08 23:12:19 +02:00
Serge
1f66038ab9 Version bump 2023-09-08 22:04:41 +02:00
Serge
04d2eb53a2 Merge pull request #1277 from seerge/Fan-Calibration
Fan calibration
2023-09-08 21:45:41 +02:00
Serge
f55a3c0824 Merge pull request #1276 from seerge/l10n_main
New Crowdin updates
2023-09-08 21:45:18 +02:00
Serge
5c5b4f297c New translations Strings.resx (Polish) 2023-09-08 19:03:48 +02:00
Serge
6f1c2ce7c1 Merge pull request #1272 from seerge/l10n_main
New Crowdin updates
2023-09-08 13:24:48 +02:00
Serge
e26feb7025 New translations Strings.resx (Chinese Simplified) 2023-09-08 05:33:49 +02:00
Serge
fef0042870 New translations Strings.resx (Chinese Traditional) 2023-09-08 02:51:36 +02:00
Serge
5a1a303ce7 Merge pull request #1270 from seerge/l10n_main
New Crowdin updates
2023-09-07 17:36:23 +02:00
Serge
5849dc0ce9 New translations Strings.resx (Portuguese, Brazilian) 2023-09-07 17:30:25 +02:00
Serge
31ca13692b New translations Strings.resx (Vietnamese) 2023-09-07 17:30:23 +02:00
Serge
49cfbc6235 New translations Strings.resx (Chinese Traditional) 2023-09-07 17:30:22 +02:00
Serge
b577e5ed90 New translations Strings.resx (Chinese Simplified) 2023-09-07 17:30:21 +02:00
Serge
3c9dca0c62 New translations Strings.resx (Ukrainian) 2023-09-07 17:30:20 +02:00
Serge
818b87fe87 New translations Strings.resx (Turkish) 2023-09-07 17:30:19 +02:00
Serge
e177207799 New translations Strings.resx (Portuguese) 2023-09-07 17:30:18 +02:00
Serge
df4cf40a5b New translations Strings.resx (Lithuanian) 2023-09-07 17:30:17 +02:00
Serge
23082d59ba New translations Strings.resx (Korean) 2023-09-07 17:30:16 +02:00
Serge
708170b1ef New translations Strings.resx (Italian) 2023-09-07 17:30:15 +02:00
Serge
3a0131a577 New translations Strings.resx (Hungarian) 2023-09-07 17:30:14 +02:00
Serge
d1f4da5473 New translations Strings.resx (German) 2023-09-07 17:30:13 +02:00
Serge
91967638af New translations Strings.resx (Spanish) 2023-09-07 17:30:12 +02:00
Serge
d9a972f6a9 New translations Strings.resx (French) 2023-09-07 17:30:11 +02:00
Serge
ce4c9bb48c New translations Strings.resx (Romanian) 2023-09-07 17:30:10 +02:00
Serge
26c74fa1df New translations Strings.resx (Polish) 2023-09-07 17:30:09 +02:00
24 changed files with 318 additions and 157 deletions

View File

@@ -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 };

181
app/Fan/FanSensorControl.cs Normal file
View File

@@ -0,0 +1,181 @@
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 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 (_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();
}
}
}

4
app/Fans.Designer.cs generated
View File

@@ -430,7 +430,7 @@ namespace GHelper
buttonCalibrate.BorderColor = Color.Transparent; buttonCalibrate.BorderColor = Color.Transparent;
buttonCalibrate.BorderRadius = 2; buttonCalibrate.BorderRadius = 2;
buttonCalibrate.FlatStyle = FlatStyle.Flat; buttonCalibrate.FlatStyle = FlatStyle.Flat;
buttonCalibrate.Location = new Point(239, 40); buttonCalibrate.Location = new Point(275, 40);
buttonCalibrate.Margin = new Padding(4, 2, 4, 2); buttonCalibrate.Margin = new Padding(4, 2, 4, 2);
buttonCalibrate.Name = "buttonCalibrate"; buttonCalibrate.Name = "buttonCalibrate";
buttonCalibrate.Secondary = true; buttonCalibrate.Secondary = true;
@@ -476,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(216, 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;

View File

@@ -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;
@@ -26,13 +27,15 @@ namespace GHelper
NvidiaGpuControl? nvControl = null; NvidiaGpuControl? nvControl = null;
ModeControl modeControl = Program.modeControl; ModeControl modeControl = Program.modeControl;
public static System.Timers.Timer timer = default!; 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);
@@ -200,8 +203,6 @@ namespace GHelper
checkApplyUV.Click += CheckApplyUV_Click; checkApplyUV.Click += CheckApplyUV_Click;
timer = new System.Timers.Timer(1000);
timer.Elapsed += Timer_Elapsed;
buttonCalibrate.Click += ButtonCalibrate_Click; buttonCalibrate.Click += ButtonCalibrate_Click;
ToggleNavigation(0); ToggleNavigation(0);
@@ -210,86 +211,12 @@ namespace GHelper
} }
const int FAN_COUNT = 3;
static int[] fanMax;
static int sameCount = 0;
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 > fanMax[i])
{
fanMax[i] = fan;
same = false;
}
}
if (same) sameCount++;
else sameCount = 0;
LabelFansResult("Max Speed - CPU: " + fanMax[(int)AsusFan.CPU] * 100 + ", GPU: " + fanMax[(int)AsusFan.GPU] * 100 + " (" + sameCount + "s)");
if (sameCount >= 15)
{
for (int i = 0; i < FAN_COUNT; i++)
{
if (fanMax[i] > 30 && fanMax[i] < 80) AppConfig.Set("fan_max_" + i, fanMax[i]);
}
sameCount = 0;
CalibrateNext();
}
}
private void CalibrateNext()
{
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;
LabelFansResult(label);
Invoke(delegate
{
buttonCalibrate.Enabled = true;
SetAxis(chartCPU, AsusFan.CPU);
SetAxis(chartGPU, AsusFan.GPU);
if (chartMid.Visible) SetAxis(chartMid, AsusFan.Mid);
});
}
private void ButtonCalibrate_Click(object? sender, EventArgs e) private void ButtonCalibrate_Click(object? sender, EventArgs e)
{ {
fanMax = new int[] { 0, 0, 0 };
buttonCalibrate.Enabled = false; buttonCalibrate.Enabled = false;
timer.Enabled = true; fanSensorControl.StartCalibration();
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 ChartCPU_MouseClick(object? sender, MouseEventArgs e) private void ChartCPU_MouseClick(object? sender, MouseEventArgs e)
@@ -660,8 +587,8 @@ namespace GHelper
{ {
if (percentage == 0) return "OFF"; if (percentage == 0) return "OFF";
int Min = HardwareControl.DEFAULT_FAN_MIN; int Min = FanSensorControl.DEFAULT_FAN_MIN;
int Max = AppConfig.Get("fan_max_" + (int)device, HardwareControl.DEFAULT_FAN_MAX); int Max = FanSensorControl.GetFanMax(device);
if (device == AsusFan.XGM) Max = 72; if (device == AsusFan.XGM) Max = 72;
@@ -809,9 +736,25 @@ 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)
{ {
if (text.Length > 0) Logger.WriteLine(text);
if (this == null || this.Text == "") return;
Invoke(delegate Invoke(delegate
{ {
labelFansResult.Text = text; labelFansResult.Text = text;
@@ -821,7 +764,6 @@ namespace GHelper
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)
{ {

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.120</AssemblyVersion> <AssemblyVersion>0.122</AssemblyVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

View File

@@ -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,11 +11,6 @@ using System.Management;
public static class HardwareControl public static class HardwareControl
{ {
public const int DEFAULT_FAN_MIN = 18;
public const int DEFAULT_FAN_MAX = 58;
const int INADEQUATE_MAX = 72;
public static IGpuControl? GpuControl; public static IGpuControl? GpuControl;
public static float? cpuTemp = -1; public static float? cpuTemp = -1;
@@ -37,62 +33,6 @@ public static class HardwareControl
static long lastUpdate; static long lastUpdate;
static int[] _fanMax = new int[3] { DEFAULT_FAN_MAX, DEFAULT_FAN_MAX, DEFAULT_FAN_MAX };
static bool _fanRpm = false;
public static int GetFanMax(AsusFan device)
{
return _fanMax[(int)device];
}
public static void SetFanMax(AsusFan device, int 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;
}
}
static HardwareControl()
{
for (int i = 0; i < 3; i++)
{
_fanMax[i] = AppConfig.Get("fan_max_" + i);
if (_fanMax[i] > INADEQUATE_MAX) _fanMax[i] = -1; // skipping inadvequate settings
if (_fanMax[i] < 0 && AppConfig.ContainsModel("401")) _fanMax[i] = 72;
if (_fanMax[i] < 0 && AppConfig.ContainsModel("503")) _fanMax[i] = 68;
if (_fanMax[i] < 0) _fanMax[i] = DEFAULT_FAN_MAX;
}
_fanRpm = AppConfig.IsNotFalse("fan_rpm");
}
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 GHelper.Properties.Strings.FanSpeed + ": " + (value * 100).ToString() + "RPM";
else
return GHelper.Properties.Strings.FanSpeed + ": " + Math.Min(Math.Round((float)value / GetFanMax(device) * 100), 100).ToString() + "%"; // relatively to 6000 rpm
}
private static int GetGpuUse() private static int GetGpuUse()
{ {
try try
@@ -245,9 +185,9 @@ public static class HardwareControl
gpuTemp = -1; gpuTemp = -1;
gpuUse = -1; gpuUse = -1;
cpuFan = FormatFan(AsusFan.CPU, Program.acpi.GetFan(AsusFan.CPU)); cpuFan = FanSensorControl.FormatFan(AsusFan.CPU, Program.acpi.GetFan(AsusFan.CPU));
gpuFan = FormatFan(AsusFan.GPU, Program.acpi.GetFan(AsusFan.GPU)); gpuFan = FanSensorControl.FormatFan(AsusFan.GPU, Program.acpi.GetFan(AsusFan.GPU));
midFan = FormatFan(AsusFan.Mid, Program.acpi.GetFan(AsusFan.Mid)); midFan = FanSensorControl.FormatFan(AsusFan.Mid, Program.acpi.GetFan(AsusFan.Mid));
cpuTemp = GetCPUTemp(); cpuTemp = GetCPUTemp();
@@ -327,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;
} }

View File

@@ -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);
} }

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>Calibrate</value>
</data>
<data name="Charging" xml:space="preserve"> <data name="Charging" xml:space="preserve">
<value>Ładowanie</value> <value>Ładowanie</value>
</data> </data>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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);
} }