예제 #1
0
        public void SendLedCommand(
            PC11XXLedCommand cmd,
            byte channel,
            byte levelR = 0,
            byte levelG = 0,
            byte levelB = 0)
        {
            var format = cmd == PC11XXLedCommand.SetLevel ? CommandFormat.FourByteData : CommandFormat.LED;

            SendCommandInternal((byte)cmd, channel, format, levelR, levelG, levelB);
        }
예제 #2
0
        public void SendLedCommand(PC11XXLedCommand cmd, byte channel, byte levelR = 0, byte levelG = 0, byte levelB = 0)
        {
            EnsureAdapterConnected();

            try
            {
                Adapter.SendLedCommand(cmd, channel, levelR, levelG, levelB);
            }
            catch (Exception ex)
            {
                throw new UnknownDeviceException(ex, DeviceName);
            }
        }