Skip to content

PR #5192 (8b6a5718) causes effects to flicker on slider changes in 0.15.4 #5486

@david-hogberg

Description

@david-hogberg

What happened?

setGeometry() changed fill(BLACK) from conditional to unconditional:

// before 
if (stop && (spc > 0 || m12 != map1D2D)) fill(BLACK);
// after (#5192)
if (stop) fill(BLACK);

deserializeSegment() calls setGeometry() on every JSON update, including slider changes (speed, intensity, custom1-3) where geometry is unchanged. This wipes the pixel buffer to black every time a slider moves. Effects that accumulate or blend with previous frame data (blendPixelColor, addPixelColor, getPixelColor) read black for one frame, producing a visible flicker.

The original condition correctly limited the clear to cases where LED positions actually shift (non-zero spacing or mapping mode change).

Suggested fix maybe something like this:

bool geometryChanged = !boundsUnchanged || m12 != map1D2D || (grp && (grouping != grp || spacing != spc));
if (stop && geometryChanged) fill(BLACK);

To Reproduce Bug

Adjust slider values on any effect using e.g. blendPixelColor, addPixelColor, getPixelColor.

Expected Behavior

No flickering

Install Method

Self-Compiled

What version of WLED?

WLED 0.15.4

Which microcontroller/board are you seeing the problem on?

ESP32-S3

Relevant log/trace output

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugwaiting for feedbackaddition information needed to better understand the issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions