Skip to content

Commit 7e4f01d

Browse files
committed
Cleanup
1 parent fbe1924 commit 7e4f01d

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

app/USB/XGM.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public static class XGM
1010
{
1111
const byte XGM_REPORT_ID = 0x5e;
1212
const int ASUS_ID = 0x0b05;
13-
static readonly int[] deviceIds = { 0x1970, 0x1a9a, 0x1C29, 0x19B6};
13+
static readonly int[] deviceIds = { 0x1970, 0x1a9a, 0x1C29};
1414

1515
public static HidDevice? GetDevice()
1616
{
@@ -108,14 +108,8 @@ public static void SetFan(byte[] curve)
108108
{
109109
Task.Run(() =>
110110
{
111-
if (IsConnected())
112-
{
113-
if (AsusACPI.IsInvalidCurve(curve)) return;
114-
byte[] msg = new byte[19];
115-
Array.Copy(new byte[] { XGM_REPORT_ID, 0xd1, 0x01 }, msg, 3);
116-
Array.Copy(curve, 0, msg, 3, curve.Length);
117-
Write(msg);
118-
}
111+
if (AsusACPI.IsInvalidCurve(curve)) return;
112+
if (IsConnected()) Write([XGM_REPORT_ID, 0xd1, 0x01, .. curve]);
119113
});
120114
}
121115
}

0 commit comments

Comments
 (0)