public bool generate(Dictionary <byte, StatusLED.RGBVal> vals, byte numLeds) { if (shouldFillAgain()) { if (goUp) { rgbColour[0]++; } else { rgbColour[0]--; } if (rgbColour[0] == 128) { goUp = false; } else if (rgbColour[0] == 0) { goUp = true; } this.lastFillTime = ToUnixTimeMS(DateTime.Now); for (byte z = 0; z < numLeds; z++) { vals[z] = new StatusLED.RGBVal(rgbColour[0], rgbColour[1], rgbColour[2]); } return(true); } return(false); }
public bool generate(Dictionary <byte, StatusLED.RGBVal> vals, byte numLeds) { if (together) { if (shouldFillAgain()) { fill(); for (byte i = 0; i < numLeds; i++) { vals[i] = new StatusLED.RGBVal(rgbColour[0], rgbColour[1], rgbColour[2]); } this.lastFillTime = this.ToUnixTimeMS(DateTime.Now); return(true); } else { } } return(false); }