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); }
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); } }
public abstract void SetLevel(LampDevice lampDevice, float level);