adding initialization to vStrip, added comment on padding bytes

This commit is contained in:
Damian Schneider 2024-09-22 09:02:42 +02:00
parent a88436c620
commit 17d59d3337
2 changed files with 2 additions and 1 deletions

View File

@ -368,6 +368,7 @@ typedef struct Segment {
};
uint8_t startY; // start Y coodrinate 2D (top); there should be no more than 255 rows
uint8_t stopY; // stop Y coordinate 2D (bottom); there should be no more than 255 rows
//note: here are 3 free bytes of padding
char *name;
// runtime data

View File

@ -712,7 +712,7 @@ void IRAM_ATTR_YN Segment::setPixelColor(int i, uint32_t col)
{
if (!isActive()) return; // not active
#ifndef WLED_DISABLE_2D
int vStrip;
int vStrip = 0;
#endif
if (i >= virtualLength() || i<0) // pixel would fall out of segment, check if this is a virtual strip NOTE: this is almost always false if not virtual strip, saves the calculation on 'standard' call
{