439 {
440 if (blendType == LINEARBLEND_NOWRAP) {
441 index =
map8(index, 0, 239);
442
443 }
444
445
447 fl::u8 lo4 = index & 0x0F;
448
450
452 fl::u8 green1 = entry.green;
453 fl::u8 blue1 = entry.blue;
454
456
458
459 if (hi4 == 15) {
461 } else {
463 }
464
467
471 red1 += red2;
472
473 fl::u8 green2 = entry.green;
476 green1 += green2;
477
478 fl::u8 blue2 = entry.blue;
481 blue1 += blue2;
482
484 }
485
489
490
491
492 if (red1) {
494#if !(FASTLED_SCALE8_FIXED == 1)
495 ++red1;
496#endif
497 }
498 if (green1) {
500#if !(FASTLED_SCALE8_FIXED == 1)
501 ++green1;
502#endif
503 }
504 if (blue1) {
506#if !(FASTLED_SCALE8_FIXED == 1)
507 ++blue1;
508#endif
509 }
511 } else {
512 red1 = 0;
513 green1 = 0;
514 blue1 = 0;
515 }
516 }
517
518 return CRGB(red1, green1, blue1);
519}
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.
fl::u8 lsrX4(fl::u8 dividend)
Helper function to divide a number by 16, aka four logical shift right (LSR)'s.
Representation of an RGB pixel (Red, Green, Blue)