Fix for 1D & remove segment ID

This commit is contained in:
Blaz Kristan 2024-01-19 17:01:57 +01:00 committed by TripleWhy
parent b97186c5bf
commit 29af62f956

View File

@ -1963,19 +1963,9 @@ uint16_t mode_palette() {
const int paletteOffset = (!inputAnimateShift) ? (inputShift) : (((strip.now * ((inputShift >> 3) +1)) & 0xFFFF) >> 8);
mathType sinTheta;
mathType cosTheta;
if (rows <= 1) {
sinTheta = 0;
cosTheta = sInt16Scale;
} else if (cols <= 1) {
sinTheta = sInt16Scale;
cosTheta = 0;
} else {
const angleType theta = (!inputAnimateRotation) ? (inputRotation * maxAngle / staticRotationScale) : (((strip.now * ((inputRotation >> 4) +1)) & 0xFFFF) * animatedRotationScale);
sinTheta = sinFunction(theta);
cosTheta = cosFunction(theta);
}
const mathType sinTheta = sinFunction(theta);
const mathType cosTheta = cosFunction(theta);
const mathType maxX = std::max(1, cols-1);
const mathType maxY = std::max(1, rows-1);
@ -2011,7 +2001,7 @@ uint16_t mode_palette() {
}
return FRAMETIME;
}
static const char _data_FX_MODE_PALETTE[] PROGMEM = "Palette@Shift,Size,Rotation,,,Animate Shift,Animate Rotation,Physical Square;;!;12;o1=1,o2=1";
static const char _data_FX_MODE_PALETTE[] PROGMEM = "Palette@Shift,Size,Rotation,,,Animate Shift,Animate Rotation,Physical Square;;!;12;c1=64,o1=1,o2=1,o3=0";
// WLED limitation: Analog Clock overlay will NOT work when Fire2012 is active