/// <summary> /// Adds new RGB-LED to daisy-chain /// </summary> /// <param name="color"></param> public void AddLED(RGBValue startColor) { RGBset tLED = new RGBset(); tLED.SetRGBvalue(startColor); LEDs.Add(tLED); }
/// <summary> /// Sets LED intensity and color by generic RGBvalue of a certain LED in the daisy-chain /// </summary> /// <param name="index">Index of LED (starting with 0)</param> /// <param name="color">Color value to be set on chosen Index</param> public void SetLED(int index, RGBValue color) { if (index < LEDs.Count) { RGBset tLED = new RGBset(); tLED.SetRGBvalue(color); LEDs[index] = tLED; } }
/// <summary> /// Sets all LEDs with according to given Array. /// </summary> /// <param name="colors">Defines the new Colors for the array. /// The array-length has to meet actual number of added LEDs</param> public void SetAllLEDs(RGBValue[] colors) { if (colors.Length == LEDs.Count) { RGBset tLED = new RGBset(); for (int idx = 0; idx < LEDs.Count; idx++) { tLED.SetRGBvalue(colors[idx]); LEDs[idx] = tLED; } } }