diff --git a/app/AnimeMatrix/AniMatrixControl.cs b/app/AnimeMatrix/AniMatrixControl.cs index c97680a4..578a09ad 100644 --- a/app/AnimeMatrix/AniMatrixControl.cs +++ b/app/AnimeMatrix/AniMatrixControl.cs @@ -98,9 +98,18 @@ namespace GHelper.AnimeMatrix } deviceSlash.Init(); - deviceSlash.SetMode((SlashMode)running); - deviceSlash.SetOptions(true, brightness, inteval); - deviceSlash.Save(); + + switch ((SlashMode)running) + { + case SlashMode.Static: + deviceSlash.SetStatic(); + break; + default: + deviceSlash.SetMode((SlashMode)running); + deviceSlash.SetOptions(true, brightness, inteval); + deviceSlash.Save(); + break; + } } }); } diff --git a/app/AnimeMatrix/SlashDevice.cs b/app/AnimeMatrix/SlashDevice.cs index f8b028f4..41d97814 100644 --- a/app/AnimeMatrix/SlashDevice.cs +++ b/app/AnimeMatrix/SlashDevice.cs @@ -19,7 +19,8 @@ namespace GHelper.AnimeMatrix Ramp, GameOver, Start, - Buzzer + Buzzer, + Static } internal class SlashPacket : Packet @@ -53,6 +54,7 @@ namespace GHelper.AnimeMatrix { SlashMode.GameOver, "Game Over"}, { SlashMode.Start, "Start"}, { SlashMode.Buzzer, "Buzzer"}, + { SlashMode.Static, "Static"}, }; private static Dictionary modeCodes = new Dictionary @@ -115,6 +117,13 @@ namespace GHelper.AnimeMatrix Set(Packet(0xD3, 0x04, 0x00, 0x0C, 0x01, modeByte, 0x02, 0x19, 0x03, 0x13, 0x04, 0x11, 0x05, 0x12, 0x06, 0x13), "SlashMode"); } + public void SetStatic() + { + Set(Packet(0xD3, 0x00, 0x00, 0x07), "Static"); + Set(Packet(0xD3, 0x00, 0x00, 0x01, 0xAC), "Static"); + Set(Packet(0xD3, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF), "StaticWhite"); + } + public void SetOptions(bool status, int brightness = 0, int interval = 0) { byte brightnessByte = (byte)(brightness * 85.333);