mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Improved 3rd (mid) fan detection https://github.com/seerge/g-helper/issues/2067
This commit is contained in:
@@ -514,16 +514,25 @@ public class AsusACPI
|
|||||||
default: fan_mode = 0; break;
|
default: fan_mode = 0; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
byte[] result;
|
||||||
|
|
||||||
switch (device)
|
switch (device)
|
||||||
{
|
{
|
||||||
case AsusFan.GPU:
|
case AsusFan.GPU:
|
||||||
return DeviceGetBuffer(DevsGPUFanCurve, fan_mode);
|
result = DeviceGetBuffer(DevsGPUFanCurve, fan_mode);
|
||||||
|
break;
|
||||||
case AsusFan.Mid:
|
case AsusFan.Mid:
|
||||||
return DeviceGetBuffer(DevsMidFanCurve, fan_mode);
|
result = DeviceGetBuffer(DevsMidFanCurve, fan_mode);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return DeviceGetBuffer(DevsCPUFanCurve, fan_mode);
|
result = DeviceGetBuffer(DevsCPUFanCurve, fan_mode);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Logger.WriteLine($"GetFan {device} :" + BitConverter.ToString(result));
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsInvalidCurve(byte[] curve)
|
public static bool IsInvalidCurve(byte[] curve)
|
||||||
|
|||||||
@@ -953,7 +953,7 @@ namespace GHelper
|
|||||||
int chartCount = 2;
|
int chartCount = 2;
|
||||||
|
|
||||||
// Middle / system fan check
|
// Middle / system fan check
|
||||||
if (!AsusACPI.IsEmptyCurve(Program.acpi.GetFanCurve(AsusFan.Mid)))
|
if (!AsusACPI.IsEmptyCurve(Program.acpi.GetFanCurve(AsusFan.Mid)) || Program.acpi.GetFan(AsusFan.Mid) >= 0)
|
||||||
{
|
{
|
||||||
AppConfig.Set("mid_fan", 1);
|
AppConfig.Set("mid_fan", 1);
|
||||||
chartCount++;
|
chartCount++;
|
||||||
|
|||||||
Reference in New Issue
Block a user