617 {
618 if (blendType == LINEARBLEND_NOWRAP) {
619 index =
map8(index, 0, 247);
620
621 }
622
624#if defined(__AVR__)
625 hi5 /= 2;
626 hi5 /= 2;
627 hi5 /= 2;
628#else
629 hi5 >>= 3;
630#endif
631 fl::u8 lo3 = index & 0x07;
632
634
636 fl::u8 green1 = entry.green;
637 fl::u8 blue1 = entry.blue;
638
640
642
643 if (hi5 == 31) {
645 } else {
647 }
648
651
655 red1 += red2;
656
657 fl::u8 green2 = entry.green;
660 green1 += green2;
661
662 fl::u8 blue2 = entry.blue;
665 blue1 += blue2;
666
668 }
669
673
674
675
676 if (red1) {
678#if !(FASTLED_SCALE8_FIXED == 1)
679 ++red1;
680#endif
681 }
682 if (green1) {
684#if !(FASTLED_SCALE8_FIXED == 1)
685 ++green1;
686#endif
687 }
688 if (blue1) {
690#if !(FASTLED_SCALE8_FIXED == 1)
691 ++blue1;
692#endif
693 }
695 } else {
696 red1 = 0;
697 green1 = 0;
698 blue1 = 0;
699 }
700 }
701
702 return CRGB(red1, green1, blue1);
703}
UISlider brightness("Brightness", 128, 0, 255, 1)
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
#define FL_PGM_READ_DWORD_NEAR(x)
Read a double word (32-bit) from PROGMEM memory.
LIB8STATIC uint8_t map8(uint8_t in, uint8_t rangeStart, uint8_t rangeEnd)
Map from one full-range 8-bit value into a narrower range of 8-bit values, possibly a range of hues.
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.
Representation of an RGB pixel (Red, Green, Blue)