mirror of
https://github.com/wled/WLED.git
synced 2025-07-21 09:46:32 +00:00
Indentation and shadowed variable.
This commit is contained in:
parent
eb5ad232a0
commit
be64930ebb
@ -652,9 +652,9 @@ void Segment::drawCharacter(unsigned char chr, int16_t x, int16_t y, uint8_t w,
|
|||||||
case 60: bits = pgm_read_byte_near(&console_font_5x12[(chr * h) + i]); break; // 5x12 font
|
case 60: bits = pgm_read_byte_near(&console_font_5x12[(chr * h) + i]); break; // 5x12 font
|
||||||
default: return;
|
default: return;
|
||||||
}
|
}
|
||||||
uint32_t col = ColorFromPaletteWLED(grad, (i+1)*255/h, 255, NOBLEND);
|
uint32_t c = ColorFromPaletteWLED(grad, (i+1)*255/h, 255, NOBLEND);
|
||||||
// pre-scale color for all pixels
|
// pre-scale color for all pixels
|
||||||
col = color_fade(col, _segBri);
|
c = color_fade(c, _segBri);
|
||||||
_colorScaled = true;
|
_colorScaled = true;
|
||||||
for (int j = 0; j<w; j++) { // character width
|
for (int j = 0; j<w; j++) { // character width
|
||||||
int x0, y0;
|
int x0, y0;
|
||||||
@ -667,7 +667,7 @@ void Segment::drawCharacter(unsigned char chr, int16_t x, int16_t y, uint8_t w,
|
|||||||
}
|
}
|
||||||
if (x0 < 0 || x0 >= (int)vWidth() || y0 < 0 || y0 >= (int)vHeight()) continue; // drawing off-screen
|
if (x0 < 0 || x0 >= (int)vWidth() || y0 < 0 || y0 >= (int)vHeight()) continue; // drawing off-screen
|
||||||
if (((bits>>(j+(8-w))) & 0x01)) { // bit set
|
if (((bits>>(j+(8-w))) & 0x01)) { // bit set
|
||||||
setPixelColorXY(x0, y0, col);
|
setPixelColorXY(x0, y0, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_colorScaled = false;
|
_colorScaled = false;
|
||||||
|
@ -102,7 +102,7 @@ uint32_t ColorFromPaletteWLED(const CRGBPalette16& pal, unsigned index, uint8_t
|
|||||||
index = (index*240) >> 8; // Blend range is affected by lo4 blend of values, remap to avoid wrapping
|
index = (index*240) >> 8; // Blend range is affected by lo4 blend of values, remap to avoid wrapping
|
||||||
}
|
}
|
||||||
unsigned hi4 = byte(index) >> 4;
|
unsigned hi4 = byte(index) >> 4;
|
||||||
const CRGB* entry = (CRGB*)( (uint8_t*)(&(pal[0])) + (hi4 * sizeof(CRGB)));
|
const CRGB* entry = (CRGB*)((uint8_t*)(&(pal[0])) + (hi4 * sizeof(CRGB)));
|
||||||
unsigned red1 = entry->r;
|
unsigned red1 = entry->r;
|
||||||
unsigned green1 = entry->g;
|
unsigned green1 = entry->g;
|
||||||
unsigned blue1 = entry->b;
|
unsigned blue1 = entry->b;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user