161{
162
163
164
165
167
169
170
171
172
173
179 if( bglight > 64) {
181 } else if( bglight > 16) {
183 } else {
185 }
186 } else {
188 }
189
191
192 for(
CRGB& pixel: L) {
193 PRNG16 = (
uint16_t)(PRNG16 * 2053) + 1384;
195 PRNG16 = (
uint16_t)(PRNG16 * 2053) + 1384;
196
197 uint8_t myspeedmultiplierQ5_3 = ((((PRNG16 & 0xFF)>>4) + (PRNG16 & 0x0F)) & 0x0F) + 0x08;
198 uint32_t myclock30 = (
uint32_t)((clock32 * myspeedmultiplierQ5_3) >> 3) + myclockoffset16;
199 uint8_t myunique8 = PRNG16 >> 8;
200
201
202
203
205
207 int16_t deltabright = cbright - backgroundBrightness;
208 if( deltabright >= 32 || (!bg)) {
209
210
211 pixel = c;
212 } else if( deltabright > 0 ) {
213
214
215 pixel =
blend( bg, c, deltabright * 8);
216 } else {
217
218
219 pixel = bg;
220 }
221 }
222}
CRGBPalette16 gCurrentPalette
CRGB computeOneTwinkle(uint32_t ms, uint8_t salt)
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
fl::u32 millis()
Universal millisecond timer - returns milliseconds since system startup.
FASTLED_FORCE_INLINE CRGB & nscale8_video(u8 scaledown) FL_NO_EXCEPT
Scale down a RGB to N/256ths of it's current brightness using "video" dimming rules.
FASTLED_FORCE_INLINE u8 getAverageLight() const FL_NO_EXCEPT
Get the average of the R, G, and B values.
#define AUTO_SELECT_BACKGROUND_COLOR