Skip to content

Commit

Permalink
Aura fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed Dec 20, 2023
1 parent 77f8d34 commit 88d4e5d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/USB/Aura.cs
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ public static void ApplyDirect(Color[] color, bool init = false)
{
Init();
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc });
AsusHid.WriteAura(MESSAGE_APPLY);
}

Array.Clear(keyBuf, 0, keyBuf.Length);
Expand Down Expand Up @@ -537,10 +538,14 @@ public static void ApplyColor(Color color, bool init = false)
ApplyDirect(Enumerable.Repeat(color, AURA_ZONES).ToArray(), init);
return;
}

else
{
if (init) AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc });
if (init)
{
Init();
AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc });
AsusHid.WriteAura(MESSAGE_APPLY);
}

byte[] buffer = new byte[64];
buffer[0] = AsusHid.AURA_ID;
Expand Down

0 comments on commit 88d4e5d

Please sign in to comment.