Esempio n. 1
0
        public static RazerReport RazerChromaStandardGetLedRgb(LED_STORAGE storage, LEDS led_id)
        {
            RazerReport report = GetRazerReport(0x03, 0x81, 0x05);

            report.arguments[0] = (byte)storage;
            report.arguments[1] = (byte)led_id;
            return(report);
        }
Esempio n. 2
0
        protected override LEDState ExecuteSubCommand(IFTDI device)
        {
            Write(device, SubCommandCode);
            Write(device, 1);
            var data = Read(device, 1);

            LEDS leds = (LEDS)data[0];

            return(new LEDState(leds));
        }
Esempio n. 3
0
        public static RazerReport RazerChromaStandardSetLedRgb(LED_STORAGE storage, LEDS led_id, RazerRgb rgb)
        {
            RazerReport report = GetRazerReport(0x03, 0x01, 0x05);

            report.arguments[0] = (byte)storage;
            report.arguments[1] = (byte)led_id;
            report.arguments[2] = rgb.r;
            report.arguments[3] = rgb.g;
            report.arguments[4] = rgb.b;
            return(report);
        }
Esempio n. 4
0
        public static RazerReport RazerChromaStandardSetLedBrightness(LED_STORAGE storage, LEDS led_id, byte brightness)
        {
            RazerReport report = GetRazerReport(0x03, 0x03, 0x03);

            report.arguments[0] = (byte)storage;
            report.arguments[1] = (byte)led_id;
            report.arguments[2] = brightness;
            return(report);
        }
Esempio n. 5
0
        public static RazerReport RazerChromaStandardSetLedEffect(LED_STORAGE storage, LEDS led_id, LED_EFFECT effect)
        {
            RazerReport report = GetRazerReport(0x03, 0x02, 0x03);

            report.arguments[0] = (byte)storage;
            report.arguments[1] = (byte)led_id;
            report.arguments[2] = clamp_u8((byte)effect, 0x00, 0x05);
            return(report);
        }
Esempio n. 6
0
        public static RazerReport RazerChromaStandardSetLedBlinking(LED_STORAGE storage, LEDS led_id)
        {
            RazerReport report = GetRazerReport(0x03, 0x04, 0x04);

            report.arguments[0] = (byte)storage;
            report.arguments[1] = (byte)led_id;
            report.arguments[2] = 0x05;
            report.arguments[3] = 0x05;
            return(report);
        }
Esempio n. 7
0
        public static RazerReport RazerChromaStandardSetLedState(LED_STORAGE storage, LEDS led_id, LED_STATE led_state)
        {
            RazerReport report = GetRazerReport(0x03, 0x00, 0x03);

            report.arguments[0] = (byte)storage;
            report.arguments[1] = (byte)led_id;
            report.arguments[2] = clamp_u8((byte)led_state, 0x00, 0x01);
            return(report);
        }
Esempio n. 8
0
        public static RazerReport RazerChromaStandardMatrixEffectBreathingDual(LED_STORAGE storage, LEDS led_id, RazerRgb rgb1, RazerRgb rgb2)
        {
            RazerReport report = GetRazerReport(0x03, 0x0A, 0x08);

            report.arguments[0] = 0x03; // Effect ID
            report.arguments[1] = 0x02; // Breathing type
            report.arguments[2] = rgb1.r;
            report.arguments[3] = rgb1.g;
            report.arguments[4] = rgb1.b;
            report.arguments[5] = rgb2.r;
            report.arguments[6] = rgb2.g;
            report.arguments[7] = rgb2.b;

            return(report);
        }
Esempio n. 9
0
        public static RazerReport RazerChromaStandardMatrixEffectBreathingRandom(LED_STORAGE storage, LEDS led_id)
        {
            RazerReport report = GetRazerReport(0x03, 0x0A, 0x08);

            report.arguments[0] = 0x03; // Effect ID
            report.arguments[1] = 0x03; // Breathing type

            return(report);
        }
Esempio n. 10
0
        public static RazerReport RazerChromaStandardMatrixEffectStarlightRandom(LED_STORAGE storage, LEDS led_id, byte speed)
        {
            RazerReport report = GetRazerReport(0x03, 0x0A, 0x01);

            speed = clamp_u8(speed, 0x01, 0x03); // For now only seen

            report.arguments[0] = 0x19;          // Effect ID
            report.arguments[1] = 0x03;          // Type random color
            report.arguments[2] = speed;         // Speed

            return(report);
        }
Esempio n. 11
0
        public static RazerReport RazerChromaStandardMatrixEffectStarlightDual(LED_STORAGE storage, LEDS led_id, byte speed, RazerRgb rgb1, RazerRgb rgb2)
        {
            RazerReport report = GetRazerReport(0x03, 0x0A, 0x01);

            speed = clamp_u8(speed, 0x01, 0x03); // For now only seen

            report.arguments[0] = 0x19;          // Effect ID
            report.arguments[1] = 0x02;          // Type two color
            report.arguments[2] = speed;         // Speed

            report.arguments[3] = rgb1.r;        // Red 1
            report.arguments[4] = rgb1.g;        // Green 1
            report.arguments[5] = rgb1.b;        // Blue 1

            // For now havent seen any chroma using this, seen the extended version
            report.arguments[6] = rgb2.r; // Red 2
            report.arguments[7] = rgb2.g; // Green 2
            report.arguments[8] = rgb2.b; // Blue 2

            return(report);
        }
Esempio n. 12
0
        public static RazerReport RazerChromaStandardMatrixEffectStatic(LED_STORAGE storage, LEDS led_id, RazerRgb rgb1)
        {
            RazerReport report = GetRazerReport(0x03, 0x0A, 0x04);

            report.arguments[0] = 0x06;   // Effect ID
            report.arguments[1] = rgb1.r; /*rgb color definition*/
            report.arguments[2] = rgb1.g;
            report.arguments[3] = rgb1.b;

            return(report);
        }
Esempio n. 13
0
        public static RazerReport RazerChromaStandardMatrixEffectReactive(LED_STORAGE storage, LEDS led_id, byte speed, RazerRgb rgb1)
        {
            RazerReport report = GetRazerReport(0x03, 0x0A, 0x05);

            report.arguments[0] = 0x02;                        // Effect ID
            report.arguments[1] = clamp_u8(speed, 0x01, 0x04); // Time
            report.arguments[2] = rgb1.r;                      /*rgb color definition*/
            report.arguments[3] = rgb1.g;
            report.arguments[4] = rgb1.b;

            return(report);
        }
Esempio n. 14
0
        public static RazerReport RazerChromaStandardMatrixEffectSpectrum(LED_STORAGE storage, LEDS led_id)
        {
            RazerReport report = GetRazerReport(0x03, 0x0A, 0x01);

            report.arguments[0] = 0x04; // Effect ID
            return(report);
        }
Esempio n. 15
0
        public static RazerReport RazerChromaStandardMatrixEffectWave(LED_STORAGE storage, LEDS led_id, WAVE_DIRECTION wave_direction)
        {
            RazerReport report = GetRazerReport(0x03, 0x0A, 0x02);

            report.arguments[0] = 0x01; // Effect ID
            report.arguments[1] = clamp_u8((byte)wave_direction, 0x01, 0x02);
            return(report);
        }
Esempio n. 16
0
 public LEDState(LEDS LEDs) : base(true)
 {
     this.LEDs = LEDs;
 }