public void LightUpStrip(RGBS color) //DELETE LATER
 {
     for (int i = 0; i < 300; ++i)
     {
         ledDisplay.SetPixel(i, 0, color);
     }
 }
Ejemplo n.º 2
0
        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());
            }
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
 public void SetPixel(int x, int y, RGBS rgbs, double strength = 1)
 {
     //Console.WriteLine("x, y: " + x + ", " + y);
     display[x, y].SetColor(rgbs, strength);
 }
Ejemplo n.º 6
0
 public void SetPixel(int x, int y, RGBS rgbs)
 {
     //Console.WriteLine("x, y: " + x + ", " + y);
     display[x, y].SetColor(rgbs);
 }
Ejemplo n.º 7
0
 public void SetColor(RGBS rgbs, double strength)
 {
     this.rgbs          = rgbs;
     this.rgbs.STRENGTH = strength;
 }
Ejemplo n.º 8
0
 public void SetColor(RGBS rgbs)
 {
     this.rgbs = rgbs;
 }
Ejemplo n.º 9
0
 public DisplayPixel(byte r, byte g, byte b, Tuple <int, int> coor, double strength = 1)
 {
     rgbs = new RGBS(r, g, b, strength);
     COOR = coor;
 }