MCPcopy Create free account
hub / github.com/FastLED/FastLED / stepDithering

Method stepDithering

src/pixel_controller.h:398–404  ·  view source on GitHub ↗

Step the dithering forward - creates triangular wave that toggles between pixels @note If updating here, be sure to update the asm version in clockless_avr.h!

Source from the content-addressed store, hash-verified

396 /// Step the dithering forward - creates triangular wave that toggles between pixels
397 /// @note If updating here, be sure to update the asm version in clockless_avr.h!
398 FASTLED_FORCE_INLINE void stepDithering() {
399 // Toggles d between two values: if d=2 and e=5, becomes 3, then back to 2, etc.
400 // This spreads dithering spatially along the strip, preventing visible patterns
401 d[0] = e[0] - d[0];
402 d[1] = e[1] - d[1];
403 d[2] = e[2] - d[2];
404 }
405
406 /// Some chipsets pre-cycle the first byte, which means we want to cycle byte 0's dithering separately
407 FASTLED_FORCE_INLINE void preStepFirstByteDithering() {

Callers 5

showPixelsMethod · 0.45
showPixelsFunction · 0.45
showPixelsMethod · 0.45
showPixelsMethod · 0.45
writePixelsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected