@@ -1966,7 +1966,7 @@ uint16_t mode_palette() {
19661966 const bool inputAnimateRotation = SEGMENT.check2 ;
19671967 const bool inputAssumeSquare = SEGMENT.check3 ;
19681968
1969- const angleType theta = (!inputAnimateRotation) ? (inputRotation * maxAngle / staticRotationScale) : (((strip.now * ((inputRotation >> 4 ) +1 )) & 0xFFFF ) * animatedRotationScale);
1969+ const angleType theta = (!inputAnimateRotation) ? (( inputRotation + 128 ) * maxAngle / staticRotationScale) : (((strip.now * ((inputRotation >> 4 ) +1 )) & 0xFFFF ) * animatedRotationScale);
19701970 const mathType sinTheta = sinFunction (theta);
19711971 const mathType cosTheta = cosFunction (theta);
19721972
@@ -1985,7 +1985,7 @@ uint16_t mode_palette() {
19851985 // So the rectangle needs to have exactly the right size. That size depends on the rotation.
19861986 // This scale computation here only considers one dimension. You can think of it like the rectangle is always scaled so that
19871987 // the left and right most points always match the left and right side of the display.
1988- const mathType scale = std::abs (sinTheta) + (std::abs (cosTheta) * maxYOut / maxXOut);
1988+ const mathType scale = std::abs (sinTheta) + (std::abs (cosTheta) * maxYOut / maxXOut);
19891989 // 2D simulation:
19901990 // If we are dealing with a 1D setup, we assume that each segment represents one line on a 2-dimensional display.
19911991 // The function is called once per segments, so we need to handle one line at a time.
@@ -2016,8 +2016,8 @@ uint16_t mode_palette() {
20162016 colorIndex = ((inputSize - 112 ) * colorIndex) / 16 ;
20172017 }
20182018 // Finally, shift the palette a bit.
2019- const int paletteOffset = (!inputAnimateShift) ? (inputShift- 128 ) : (((strip.now * ((inputShift >> 3 ) +1 )) & 0xFFFF ) >> 8 );
2020- colorIndex + = paletteOffset;
2019+ const int paletteOffset = (!inputAnimateShift) ? (inputShift) : (((strip.now * ((inputShift >> 3 ) +1 )) & 0xFFFF ) >> 8 );
2020+ colorIndex - = paletteOffset;
20212021 const uint32_t color = SEGMENT.color_wheel ((uint8_t )colorIndex);
20222022 if (isMatrix) {
20232023 SEGMENT.setPixelColorXY (x, y, color);
@@ -2028,7 +2028,7 @@ uint16_t mode_palette() {
20282028 }
20292029 return FRAMETIME;
20302030}
2031- static const char _data_FX_MODE_PALETTE[] PROGMEM = " Palette@Shift,Size,Rotation,,,Animate Shift,Animate Rotation,Anamorphic;;!;12;c1=128,c2=128,c3=128, o1=1,o2=1 ,o3=0 " ;
2031+ static const char _data_FX_MODE_PALETTE[] PROGMEM = " Palette@Shift,Size,Rotation,,,Animate Shift,Animate Rotation,Anamorphic;;!;12;ix=112,c1=0, o1=1,o2=0 ,o3=1 " ;
20322032
20332033
20342034// WLED limitation: Analog Clock overlay will NOT work when Fire2012 is active
0 commit comments