Get the average of the R, G, and B values.
- Examples
- TwinkleFox.ino.
Definition at line 158 of file crgb.hpp.
158 {
159#if FASTLED_SCALE8_FIXED == 1
160 const uint8_t eightyfive = 85;
161#else
162 const uint8_t eightyfive = 86;
163#endif
165 scale8_LEAVING_R1_DIRTY( g, eightyfive) + \
166 scale8_LEAVING_R1_DIRTY( b, eightyfive);
168 return avg;
169}
LIB8STATIC_ALWAYS_INLINE void cleanup_R1()
Clean up the r1 register after a series of *LEAVING_R1_DIRTY calls.
LIB8STATIC_ALWAYS_INLINE uint8_t scale8_LEAVING_R1_DIRTY(uint8_t i, fract8 scale)
This version of scale8() does not clean up the R1 register on AVR.
References cleanup_R1(), FASTLED_FORCE_INLINE, and scale8_LEAVING_R1_DIRTY().
Referenced by fl::TwinkleFox::drawTwinkleFox(), and drawTwinkles().