public void LightUpStrip(RGBS color) //DELETE LATER { for (int i = 0; i < 300; ++i) { ledDisplay.SetPixel(i, 0, color); } }
public ColorSettings() //default { RGBS[] BackgroundColors = new RGBS[2]; RGBS[] ColumnColors = new RGBS[1]; RGBS[] ActivationColors = new RGBS[1]; BackgroundColors[0] = new RGBS(255, 255, 0, .2); BackgroundColors[1] = new RGBS(255, 255, 0, 1); ColumnColors[0] = new RGBS(255, 0, 255); ActivationColors[0] = new RGBS(0, 255, 255); this.BackgroundColors = BackgroundColors; this.ColumnColors = ColumnColors; this.ActivationColors = ActivationColors; }
public VisualizerController(int w, int h) { display = new VisualizerDisplay(w, h); ledDisplay = new VisualizerDisplay(300, 1); //DELETE LATER soundProcessor = new SoundProcessor(); int frequencies = Dashboard.WorkingProfile.SoundProcessorProfile.frequencyRanges.Length; sectionColor = new RGBS[frequencies]; for (int i = 0; i < frequencies; ++i) { sectionColor[i] = new RGBS(Dashboard.WorkingProfile.ColorProfile.ColumnColors[0].ToARGB()); } }
public byte[] pixelToData(int x, int y) { byte[] packet = new byte[Dashboard.WorkingProfile.NetworkProfile.LEDDataSize]; int led_index = x + (y * width); byte[] indexAsBytes = BitConverter.GetBytes(led_index); //bytes in little endian order packet[0] = indexAsBytes[1]; //pack in big endian order packet[1] = indexAsBytes[0]; //^ RGBS color = display[x, y].rgbs; packet[2] = color.R; packet[3] = color.G; packet[4] = color.B; return(packet); }
public void SetPixel(int x, int y, RGBS rgbs, double strength = 1) { //Console.WriteLine("x, y: " + x + ", " + y); display[x, y].SetColor(rgbs, strength); }
public void SetPixel(int x, int y, RGBS rgbs) { //Console.WriteLine("x, y: " + x + ", " + y); display[x, y].SetColor(rgbs); }
public void SetColor(RGBS rgbs, double strength) { this.rgbs = rgbs; this.rgbs.STRENGTH = strength; }
public void SetColor(RGBS rgbs) { this.rgbs = rgbs; }
public DisplayPixel(byte r, byte g, byte b, Tuple <int, int> coor, double strength = 1) { rgbs = new RGBS(r, g, b, strength); COOR = coor; }