Segment clear bugfix.
getPixelColor fix.
This commit is contained in:
parent
1e4f8be74b
commit
2fe4edb6df
@ -412,18 +412,10 @@ uint32_t Segment::getPixelColor(uint16_t i)
|
||||
return getPixelColorXY(i % vW, i / vW);
|
||||
break;
|
||||
case M12_VerticalBar:
|
||||
// map linear pixel into 2D segment area (even for 1D segments, expanding vertically)
|
||||
return getPixelColorXY(i, 0);
|
||||
break;
|
||||
case M12_Circle:
|
||||
{
|
||||
int x = roundf(roundf((vW / 2) * 10)/10);
|
||||
int y = roundf(roundf((i + vH / 2) * 10)/10);
|
||||
return getPixelColorXY(x,y);
|
||||
}
|
||||
break;
|
||||
case M12_Block:
|
||||
return getPixelColorXY(vW / 2, vH / 2 - i - 1);
|
||||
// only use 1st row
|
||||
return getPixelColorXY(i, 0);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
@ -79,11 +79,13 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
|
||||
uint16_t grp = elem["grp"] | seg.grouping;
|
||||
uint16_t spc = elem[F("spc")] | seg.spacing;
|
||||
uint16_t of = seg.offset;
|
||||
uint8_t soundSim = elem[F("ssim")] | seg.soundSim;
|
||||
uint8_t map1D2D = elem[F("mp12")] | seg.map1D2D;
|
||||
|
||||
seg.soundSim = elem[F("ssim")] | seg.soundSim;
|
||||
seg.map1D2D = elem[F("mp12")] | seg.map1D2D;
|
||||
if ((spc>0 && spc!=seg.spacing) || seg.map1D2D!=map1D2D) seg.fill(BLACK); // clear spacing gaps
|
||||
|
||||
if ((spc>0 && spc!=seg.spacing) || seg.map1D2D!=prev.map1D2D) seg.fill(BLACK); // clear spacing gaps
|
||||
seg.map1D2D = map1D2D & 0x03;
|
||||
seg.soundSim = soundSim & 0x07;
|
||||
|
||||
uint16_t len = 1;
|
||||
if (stop > start) len = stop - start;
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2207191
|
||||
#define VERSION 2207211
|
||||
|
||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||
//#define WLED_USE_MY_CONFIG
|
||||
|
Loading…
Reference in New Issue
Block a user