Esempio n. 1
0
        public static PSVRReport GetSetHDMLeds(LedMask Mask, byte ValueA, byte ValueB, byte ValueC, byte ValueD, byte ValueE, byte ValueF, byte ValueG, byte ValueH, byte ValueI)
        {
            ushort     mMask = (ushort)Mask;
            PSVRReport cmd   = new PSVRReport();

            cmd.ReportID   = 0x15;
            cmd.DataStart  = 0xaa;
            cmd.DataLength = 16;
            cmd.Data       = new byte[] { (byte)(mMask & 0xFF), (byte)((mMask >> 8) & 0xFF), ValueA, ValueB, ValueC, ValueD, ValueE, ValueF, ValueG, ValueH, ValueI, 0, 0, 0, 0, 0 };
            return(cmd);
        }
Esempio n. 2
0
        public static PSVRReport GetSetHDMLed(LedMask Mask, byte Value)
        {
            ushort     mMask = (ushort)Mask;
            PSVRReport cmd   = new PSVRReport();

            cmd.ReportID   = 0x15;
            cmd.DataStart  = 0xaa;
            cmd.DataLength = 16;
            cmd.Data       = new byte[] { (byte)(mMask & 0xFF), (byte)((mMask >> 8) & 0xFF), Value, Value, Value, Value, Value, Value, Value, Value, Value, 0, 0, 0, 0, 0 };
            return(cmd);
        }
Esempio n. 3
0
        public static PSVRCommand GetSetHDMLeds(LedMask Mask, byte ValueA, byte ValueB, byte ValueC, byte ValueD, byte ValueE, byte ValueF, byte ValueG, byte ValueH, byte ValueI)
        {
            ushort      mMask = (ushort)Mask;
            PSVRCommand cmd   = new PSVRCommand();

            cmd.r_id   = 0x15;
            cmd.magic  = 0xaa;
            cmd.length = 16;
            cmd.data   = new byte[] { (byte)(mMask & 0xFF), (byte)((mMask >> 8) & 0xFF), ValueA, ValueB, ValueC, ValueD, ValueE, ValueF, ValueG, ValueH, ValueI, 0, 0, 0, 0, 0 };
            return(cmd);
        }
Esempio n. 4
0
        public static PSVRCommand GetSetHDMLed(LedMask Mask, byte Value)
        {
            ushort      mMask = (ushort)Mask;
            PSVRCommand cmd   = new PSVRCommand();

            cmd.r_id   = 0x15;
            cmd.magic  = 0xaa;
            cmd.length = 16;
            cmd.data   = new byte[] { (byte)(mMask & 0xFF), (byte)((mMask >> 8) & 0xFF), Value, Value, Value, Value, Value, Value, Value, Value, Value, 0, 0, 0, 0, 0 };
            return(cmd);
        }
Esempio n. 5
0
        private void button17_Click(object sender, EventArgs e)
        {
            LedMask mask = LedMask.None;

            switch (cbLeds.SelectedIndex)
            {
            case 0:
                Settings.Instance.LedAIntensity = (byte)trkLedIntensity.Value;
                mask = LedMask.LedA;
                break;

            case 1:
                Settings.Instance.LedBIntensity = (byte)trkLedIntensity.Value;
                mask = LedMask.LedB;
                break;

            case 2:
                Settings.Instance.LedCIntensity = (byte)trkLedIntensity.Value;
                mask = LedMask.LedC;
                break;

            case 3:
                Settings.Instance.LedDIntensity = (byte)trkLedIntensity.Value;
                mask = LedMask.LedD;
                break;

            case 4:
                Settings.Instance.LedEIntensity = (byte)trkLedIntensity.Value;
                mask = LedMask.LedE;
                break;

            case 5:
                Settings.Instance.LedFIntensity = (byte)trkLedIntensity.Value;
                mask = LedMask.LedF;
                break;

            case 6:
                Settings.Instance.LedGIntensity = (byte)trkLedIntensity.Value;
                mask = LedMask.LedG;
                break;

            case 7:
                Settings.Instance.LedHIntensity = (byte)trkLedIntensity.Value;
                mask = LedMask.LedH;
                break;

            case 8:
                Settings.Instance.LedIIntensity = (byte)trkLedIntensity.Value;
                mask = LedMask.LedI;
                break;

            case 9:
                Settings.Instance.LedAIntensity                                 =
                    Settings.Instance.LedBIntensity                             =
                        Settings.Instance.LedCIntensity                         =
                            Settings.Instance.LedDIntensity                     =
                                Settings.Instance.LedEIntensity                 =
                                    Settings.Instance.LedFIntensity             =
                                        Settings.Instance.LedGIntensity         =
                                            Settings.Instance.LedHIntensity     =
                                                Settings.Instance.LedIIntensity = (byte)trkLedIntensity.Value;

                mask = LedMask.All;
                break;
            }

            if (mask != LedMask.None)
            {
                Settings.SaveSettings();
                PSVRController.ApplyLedSettings();
            }
        }