mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Fix for possible fan issues on old laptops
This commit is contained in:
@@ -213,6 +213,11 @@ public class ASUSWmi
|
||||
|
||||
int result;
|
||||
|
||||
for (int i = 8; i < curve.Length; i++)
|
||||
{
|
||||
curve[i] = Math.Max((byte)0, Math.Min((byte)99, curve[i])); // it seems to be a bug, when some old model's bios can go nuts if fan is set to 100%
|
||||
}
|
||||
|
||||
switch (device)
|
||||
{
|
||||
case 1:
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace GHelper
|
||||
|
||||
public static bool HasSecondColor()
|
||||
{
|
||||
return mode == 1;
|
||||
return (mode == 1 && !Program.config.ContainsModel("TUF"));
|
||||
}
|
||||
|
||||
public static int Speed
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>0.44</AssemblyVersion>
|
||||
<AssemblyVersion>0.45</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -47,13 +47,14 @@ public static class HardwareMonitor
|
||||
public static void ReadSensors()
|
||||
{
|
||||
batteryDischarge = -1;
|
||||
gpuTemp = -1;
|
||||
|
||||
cpuFan = FormatFan(Program.wmi.DeviceGet(ASUSWmi.CPU_Fan));
|
||||
gpuFan = FormatFan(Program.wmi.DeviceGet(ASUSWmi.GPU_Fan));
|
||||
midFan = FormatFan(Program.wmi.DeviceGet(ASUSWmi.Mid_Fan));
|
||||
|
||||
cpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_CPU);
|
||||
gpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_GPU);
|
||||
|
||||
|
||||
if (cpuTemp < 0) try
|
||||
{
|
||||
@@ -72,11 +73,15 @@ public static class HardwareMonitor
|
||||
|
||||
}
|
||||
catch (Exception ex) {
|
||||
gpuTemp = null;
|
||||
gpuTemp = -1;
|
||||
Logger.WriteLine("Failed reading GPU temp");
|
||||
Logger.WriteLine(ex.ToString());
|
||||
}
|
||||
|
||||
if (gpuTemp < 0)
|
||||
gpuTemp = Program.wmi.DeviceGet(ASUSWmi.Temp_GPU);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var cb = new PerformanceCounter("Power Meter", "Power", "Power Meter (0)", true);
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace GHelper
|
||||
|
||||
}
|
||||
|
||||
Logger.WriteLine("------------");
|
||||
Logger.WriteLine("App launched");
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
|
||||
Reference in New Issue
Block a user