コード例 #1
0
ファイル: LampService.cs プロジェクト: Necat0r/Automation
        public override void SetLevel(LampDevice lampDevice, float level)
        {
            byte byteLevel = (byte)(level * 255.0f);

            // size, payload[size]
            byte[] data = new byte[] { (byte)3, (byte)DEVICE_ID, (byte)lampDevice.Channel, (byte)byteLevel };

            if (mSerialHelper.IsConnected)
                mSerialHelper.WriteData(data);
        }
コード例 #2
0
        public override void SetLevel(LampDevice lampDevice, float level)
        {
            byte byteLevel = (byte)(level * 255.0f);

            // size, payload[size]
            byte[] data = new byte[] { (byte)3, (byte)DEVICE_ID, (byte)lampDevice.Channel, (byte)byteLevel };

            if (mSerialHelper.IsConnected)
            {
                mSerialHelper.WriteData(data);
            }
        }
コード例 #3
0
ファイル: LampServiceBase.cs プロジェクト: Necat0r/Automation
 public abstract void SetLevel(LampDevice lampDevice, float level);
コード例 #4
0
ファイル: LampServiceBase.cs プロジェクト: radtek/Automation
 public abstract void SetLevel(LampDevice lampDevice, float level);