Пример #1
0
        /*  public void SendData(int ledCount, byte[] data, LightingMode mode)
         * {
         *    Task.Run(() => sender.Send(1, SanitizeDataArray(ledCount, data, mode)));
         * }*/

        public void SendData(LEDFrame frame)
        {
            if (!frame.Zones.HasFlag(LightZone.Strip))
            {
                return;
            }
            LEDData data = frame.Leds;

            //sender.Send(1, SanitizeDataArray(ledCount, data, mode))
            sender.Send(1, data.Strip.ToByteArray(this.reverseOrder));
        }
Пример #2
0
        public void SendData(LEDFrame frame) // TODO: Abstract away these details, make parent class
        {
            if (!enabled || disposed)
            {
                return;
            }
            LEDData data = frame.Leds;

            // KEYBOARD
            if (frame.Zones.HasFlag(LightZone.Keyboard))
            {
                SendKeyboardData(data);
            }

            // MOUSE
            if (frame.Zones.HasFlag(LightZone.Mouse))
            {
                SendMouseData(data);
            }

            // MOUSEPAD
            if (frame.Zones.HasFlag(LightZone.Mouse))
            {
                SendMousepadData(data);
            }

            // HEADSET
            if (frame.Zones.HasFlag(LightZone.Headset))
            {
                SendHeadsetData(data);
            }

            // 2D KEYPAD
            if (frame.Zones.HasFlag(LightZone.Keypad))
            {
                SendKeypadData(data);
            }

            // GENERAL (CHROMA LINK)
            if (frame.Zones.HasFlag(LightZone.General))
            {
                SendGeneralData(data);
            }
        }