コード例 #1
0
ファイル: LEDModern.cs プロジェクト: wiz/CorsairLinkPlusPlus
        internal override byte[] GetRGBInternal()
        {
            DisabledCheck();

            byte[] rgbInt;

            using (var localMutexLock = CorsairRootDevice.usbGlobalMutex.GetLock())
            {
                modernDevice.SetCurrentLED(id);
                rgbInt = modernDevice.ReadRegister(0x07, 3);
            }

            return(rgbInt);
        }
コード例 #2
0
        internal override double GetFixedRPM()
        {
            DisabledCheck();

            byte[] rpmB;

            using (var localMutexLock = CorsairRootDevice.usbGlobalMutex.GetLock())
            {
                modernDevice.SetCurrentFan(id);
                rpmB = modernDevice.ReadRegister(0x14, 2);
            }

            return(BitConverter.ToInt16(rpmB, 0));
        }
コード例 #3
0
        protected override object GetValueInternal()
        {
            DisabledCheck();

            byte[] ret;
            using (var localMutexLock = CorsairRootDevice.usbGlobalMutex.GetLock())
            {
                modernDevice.SetCurrentTemp(id);
                ret = modernDevice.ReadRegister(0x0E, 2);
            }
            return(((double)BitConverter.ToInt16(ret, 0)) / 256.0);
        }