diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index cc44d581..a8715a8e 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -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; diff --git a/wled00/json.cpp b/wled00/json.cpp index 23857edc..7cd473b5 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -78,12 +78,14 @@ 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; + 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; diff --git a/wled00/wled.h b/wled00/wled.h index 5b829861..6e491274 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -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