Skip to content

Commit

Permalink
Slash Enable tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
seerge committed May 26, 2024
1 parent 740a10f commit f794110
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/AnimeMatrix/AniMatrixControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public void SetSlash(bool wakeUp = false)

if (brightness == 0 || (auto && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online) || (lid && lidClose))
{
deviceSlash.SetEnabled(false);
deviceSlash.Init();
deviceSlash.SetOptions(false, 0, 0);
deviceSlash.SetSleepActive(false);
Expand All @@ -98,6 +99,7 @@ public void SetSlash(bool wakeUp = false)
_wakeUp = false;
}

deviceSlash.SetEnabled(true);
deviceSlash.Init();

switch ((SlashMode)running)
Expand Down
2 changes: 0 additions & 2 deletions app/AnimeMatrix/SlashDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,10 @@ public void WakeUp()
Set(Packet<SlashPacket>(Encoding.ASCII.GetBytes("ASUS Tech.Inc.")), "SlashWakeUp");
Set(Packet<SlashPacket>(0xC2), "SlashWakeUp");
Set(Packet<SlashPacket>(0xD1, 0x01, 0x00, 0x01), "SlashWakeUp");
Set(Packet<SlashPacket>(0xD2, 0x03, 0x00, 0x0C), "SlashWakeUpMode");
}

public void Init()
{
SetEnabled(true);
Set(Packet<SlashPacket>(0xD7, 0x00, 0x00, 0x01, 0xAC), "SlashInit");
Set(Packet<SlashPacket>(0xD2, 0x02, 0x01, 0x08, 0xAB), "SlashInit");
}
Expand Down

0 comments on commit f794110

Please sign in to comment.