public bool SetBackgroundColor(PulseColor paramPulseColor, bool paramBoolean) { int colorIdx = WebColorHelper.RGBToWeb216Index(paramPulseColor); sbyte[] cmd = new sbyte[] { -86, 88, 2, (sbyte)colorIdx, (sbyte)(paramBoolean ? 1 : 0) }; _bluetoothClient.Client.Send(cmd.Select(b => (byte)b).ToArray()); return(true); }
public bool SetCharacterPattern(char character, PulseColor foreground, PulseColor background, bool inlcudeSlave) { if (!IsConnectMasterDevice) { return(false); } int foregroundColor = WebColorHelper.RGBToWeb216Index(foreground); int backgroundColor = WebColorHelper.RGBToWeb216Index(background); SppCmdHelper.SetCharacterPattern(character, foregroundColor, backgroundColor, inlcudeSlave); return(Convert.ToBoolean(true)); }
public bool SetColorImage(PulseColor[] paramArrayOfPulseColor) { if (!IsConnectMasterDevice) { return(false); } sbyte[] cmd = new sbyte[102]; cmd[0] = -86; cmd[1] = 89; cmd[2] = 99; for (int i = 0; i < 99; i++) { cmd[i + 3] = (sbyte)WebColorHelper.RGBToWeb216Index(paramArrayOfPulseColor[i]); } _bluetoothClient.Client.Send(cmd.Select(b => (byte)b).ToArray()); return(true); }