Transpose fix.
This commit is contained in:
parent
9cb6f95420
commit
d3d8fdff13
@ -3574,7 +3574,8 @@ static const char _data_FX_MODE_PLASMA[] PROGMEM = "Plasma@Phase,;1,2,3;!;1d";
|
|||||||
*/
|
*/
|
||||||
uint16_t mode_percent(void) {
|
uint16_t mode_percent(void) {
|
||||||
|
|
||||||
uint8_t percent = MAX(0, MIN(200, SEGMENT.intensity));
|
uint8_t percent = SEGMENT.intensity;
|
||||||
|
percent = constrain(percent, 0, 200);
|
||||||
uint16_t active_leds = (percent < 100) ? SEGLEN * percent / 100.0
|
uint16_t active_leds = (percent < 100) ? SEGLEN * percent / 100.0
|
||||||
: SEGLEN * (200 - percent) / 100.0;
|
: SEGLEN * (200 - percent) / 100.0;
|
||||||
|
|
||||||
@ -4003,7 +4004,8 @@ static const char _data_FX_MODE_FLOW[] PROGMEM = "Flow@!,!;!,!,!;!;mp12=1,1d"; /
|
|||||||
*/
|
*/
|
||||||
uint16_t mode_chunchun(void)
|
uint16_t mode_chunchun(void)
|
||||||
{
|
{
|
||||||
SEGMENT.fill(SEGCOLOR(1));
|
//SEGMENT.fill(SEGCOLOR(1));
|
||||||
|
SEGMENT.fade_out(254);
|
||||||
uint16_t counter = strip.now * (6 + (SEGMENT.speed >> 4));
|
uint16_t counter = strip.now * (6 + (SEGMENT.speed >> 4));
|
||||||
uint16_t numBirds = 2 + (SEGLEN >> 3); // 2 + 1/8 of a segment
|
uint16_t numBirds = 2 + (SEGLEN >> 3); // 2 + 1/8 of a segment
|
||||||
uint16_t span = (SEGMENT.intensity << 8) / numBirds;
|
uint16_t span = (SEGMENT.intensity << 8) / numBirds;
|
||||||
|
@ -460,12 +460,13 @@ void IRAM_ATTR Segment::setPixelColor(int i, uint32_t col)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else if (width()==1 && height()>1) {
|
} else if (width()==1 || height()==1) {
|
||||||
// we have a vertical 1D segment
|
int x = 0, y = 0;
|
||||||
setPixelColorXY(0, i, col); // transpose
|
// we have a vertical or horizontal 1D segment
|
||||||
} else if (width()>1 && height()==1) {
|
if (height()>1) { y = i; }
|
||||||
// we have a horizontal 1D segment
|
if (width()>1 ) { x = i; }
|
||||||
setPixelColorXY(i, 0, col);
|
if (transpose ) { int t = x; x = y; y = t; }
|
||||||
|
setPixelColorXY(x, y, col);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -774,7 +774,7 @@ function populateSegments(s)
|
|||||||
${!isM?rvXck:''}
|
${!isM?rvXck:''}
|
||||||
${isM&&stoY-staY>1&&stoX-staX>1?map2D:''}
|
${isM&&stoY-staY>1&&stoX-staX>1?map2D:''}
|
||||||
${s.AudioReactive && s.AudioReactive.on ? "" : sndSim}
|
${s.AudioReactive && s.AudioReactive.on ? "" : sndSim}
|
||||||
<label class="check revchkl">
|
<label class="check revchkl" id="seg${i}lbtm">
|
||||||
${isM?'Transpose':'Mirror effect'}
|
${isM?'Transpose':'Mirror effect'}
|
||||||
<input type="checkbox" id="seg${i}${isM?'tp':'mi'}" onchange="${(isM?'setTp(':'setMi(')+i})" ${isM?(inst.tp?"checked":""):(inst.mi?"checked":"")}>
|
<input type="checkbox" id="seg${i}${isM?'tp':'mi'}" onchange="${(isM?'setTp(':'setMi(')+i})" ${isM?(inst.tp?"checked":""):(inst.mi?"checked":"")}>
|
||||||
<span class="checkmark"></span>
|
<span class="checkmark"></span>
|
||||||
@ -1038,7 +1038,9 @@ function updateLen(s)
|
|||||||
let startY = parseInt(gId(`seg${s}sY`).value);
|
let startY = parseInt(gId(`seg${s}sY`).value);
|
||||||
let stopY = parseInt(gId(`seg${s}eY`).value);
|
let stopY = parseInt(gId(`seg${s}eY`).value);
|
||||||
len *= (stopY-(cfg.comp.seglen?0:startY));
|
len *= (stopY-(cfg.comp.seglen?0:startY));
|
||||||
|
let tPL = gId(`seg${s}lbtm`);
|
||||||
if (stop-start>1 && stopY-startY>1) {
|
if (stop-start>1 && stopY-startY>1) {
|
||||||
|
tPL.classList.remove("hide");
|
||||||
let sE = gId('fxlist').querySelector(`.lstI[data-id="${selectedFx}"]`);
|
let sE = gId('fxlist').querySelector(`.lstI[data-id="${selectedFx}"]`);
|
||||||
if (sE) {
|
if (sE) {
|
||||||
let sN = sE.querySelector(".lstIname").innerText;
|
let sN = sE.querySelector(".lstIname").innerText;
|
||||||
@ -1048,6 +1050,9 @@ function updateLen(s)
|
|||||||
else seg.classList.add("hide");
|
else seg.classList.add("hide");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
tPL.classList.add("hide");
|
||||||
|
gId(`seg${s}tp`).checked = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var out = "(delete)";
|
var out = "(delete)";
|
||||||
@ -1982,6 +1987,7 @@ function setSeg(s)
|
|||||||
var stopY = parseInt(gId(`seg${s}eY`).value);
|
var stopY = parseInt(gId(`seg${s}eY`).value);
|
||||||
obj.seg.startY = startY;
|
obj.seg.startY = startY;
|
||||||
obj.seg.stopY = (cfg.comp.seglen?startY:0)+stopY;
|
obj.seg.stopY = (cfg.comp.seglen?startY:0)+stopY;
|
||||||
|
obj.seg.tp = gId(`seg${s}tp`).checked;
|
||||||
}
|
}
|
||||||
if (gId(`seg${s}grp`)) {
|
if (gId(`seg${s}grp`)) {
|
||||||
var grp = parseInt(gId(`seg${s}grp`).value);
|
var grp = parseInt(gId(`seg${s}grp`).value);
|
||||||
|
3737
wled00/html_ui.h
3737
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user