コード例 #1
0
        public void SetTemperature(double temperature)
        {
            DisabledCheck();

            using (var localMutexLock = CorsairRootDevice.usbGlobalMutex.GetLock())
            {
                modernDevice.SetCurrentFan(id, true);
                modernDevice.WriteRegister(0x15, BitConverter.GetBytes((short)(temperature * 256.0)), true);
            }
        }
コード例 #2
0
ファイル: LEDModern.cs プロジェクト: wiz/CorsairLinkPlusPlus
        internal override void SetRGB(byte[] rgb)
        {
            DisabledCheck();

            byte[] reg = new byte[12];
            Buffer.BlockCopy(rgb, 0, reg, 0, rgb.Length);

            using (var localMutexLock = CorsairRootDevice.usbGlobalMutex.GetLock())
            {
                modernDevice.SetCurrentLED(id, true);
                modernDevice.WriteRegister(0x0B, reg);
            }

            Refresh(true);
        }