140 {
141
142
143
144
145 uint16_t PRNG16 = 11337;
146 uint32_t clock32 = millis();
147
153 if (bglight > 64) {
155 } else if (bglight > 16) {
157 } else {
159 }
160 }
161
163
164 for (uint16_t i = 0; i <
mNumLeds; i++) {
165 PRNG16 = (uint16_t)(PRNG16 * 2053) + 1384;
166 uint16_t myclockoffset16 = PRNG16;
167 PRNG16 = (uint16_t)(PRNG16 * 2053) + 1384;
168 uint8_t myspeedmultiplierQ5_3 =
169 ((((PRNG16 & 0xFF) >> 4) + (PRNG16 & 0x0F)) & 0x0F) + 0x08;
170 uint32_t myclock30 =
171 (uint32_t)((clock32 * myspeedmultiplierQ5_3) >> 3) +
172 myclockoffset16;
173 uint8_t myunique8 = PRNG16 >> 8;
174
176
178 int16_t deltabright = cbright - backgroundBrightness;
179 if (deltabright >= 32 || (!bg)) {
181 } else if (deltabright > 0) {
183 } else {
185 }
186 }
187 }
bool autoSelectBackgroundColor
CRGB computeOneTwinkle(uint32_t ms, uint8_t salt)
CRGBPalette16 currentPalette
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
FASTLED_FORCE_INLINE CRGB & nscale8_video(uint8_t scaledown)
Scale down a RGB to N/256ths of it's current brightness using "video" dimming rules.
FASTLED_FORCE_INLINE uint8_t getAverageLight() const
Get the average of the R, G, and B values.