Skip to content

Commit

Permalink
removed unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DedeHai committed Jan 28, 2025
1 parent 01977a4 commit b0b66ae
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions wled00/colors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ uint32_t color_fade(uint32_t c1, uint8_t amount, bool video)
// 1:1 replacement of fastled function optimized for ESP, slightly faster, more accurate and uses less flash (~ -200bytes)
uint32_t ColorFromPaletteWLED(const CRGBPalette16& pal, unsigned index, uint8_t brightness, TBlendType blendType)
{

if (blendType == LINEARBLEND_NOWRAP) {
index = (index * 0xF0) >> 8; // Blend range is affected by lo4 blend of values, remap to avoid wrapping
}
uint32_t clr32;
unsigned hi4 = byte(index) >> 4;
unsigned lo4 = (index & 0x0F);
const CRGB* entry = (CRGB*)&(pal[0]) + hi4;
Expand Down

0 comments on commit b0b66ae

Please sign in to comment.