Merge remote-tracking branch 'upstream/main' into mdev
- removed !isM checks on ledmap cause supported in WLED MM
This commit is contained in:
@@ -247,12 +247,12 @@ CRGBPalette16 &Segment::loadPalette(CRGBPalette16 &targetPalette, uint8_t pal) {
|
||||
_lastPaletteChange = millis();
|
||||
timeSinceLastChange = 0;
|
||||
}
|
||||
if (timeSinceLastChange <= 500) {
|
||||
if (timeSinceLastChange <= 250) {
|
||||
targetPalette = prevRandomPalette;
|
||||
// there needs to be 255 palette blends (48) for full blend but that is too resource intensive
|
||||
// so 128 is a compromise (we need to perform full blend of the two palettes as each segment can have random
|
||||
// palette selected but only 2 static palettes are used)
|
||||
size_t noOfBlends = ((128U * timeSinceLastChange) / 500U);
|
||||
size_t noOfBlends = ((128U * timeSinceLastChange) / 250U);
|
||||
for (size_t i=0; i<noOfBlends; i++) nblendPaletteTowardPalette(targetPalette, randomPalette, 48);
|
||||
} else {
|
||||
targetPalette = randomPalette;
|
||||
@@ -1161,7 +1161,7 @@ uint8_t Segment::get_random_wheel_index(uint8_t pos) {
|
||||
* Gets a single color from the currently selected palette.
|
||||
* @param i Palette Index (if mapping is true, the full palette will be _virtualSegmentLength long, if false, 255). Will wrap around automatically.
|
||||
* @param mapping if true, LED position in segment is considered for color
|
||||
* @param wrap FastLED palettes will usally wrap back to the start smoothly. Set false to get a hard edge
|
||||
* @param wrap FastLED palettes will usually wrap back to the start smoothly. Set false to get a hard edge
|
||||
* @param mcol If the default palette 0 is selected, return the standard color 0, 1 or 2 instead. If >2, Party palette is used instead
|
||||
* @param pbri Value to scale the brightness of the returned color by. Default is 255. (no scaling)
|
||||
* @returns Single color from palette
|
||||
|
||||
Reference in New Issue
Block a user