Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FX115 ( Blends) Missing pixels on peek and fixtures #4335

Open
1 task done
dosipod opened this issue Dec 1, 2024 · 8 comments
Open
1 task done

FX115 ( Blends) Missing pixels on peek and fixtures #4335

dosipod opened this issue Dec 1, 2024 · 8 comments
Assignees
Labels
bug confirmed The bug is reproducable and confirmed fixed in source This issue is unsolved in the latest release but fixed in master

Comments

@dosipod
Copy link
Contributor

dosipod commented Dec 1, 2024

What happened?

FX115 ( Blends) missing pixels
image

To Reproduce Bug

Use FX115 ( Blends) and you will notice missing pixels on peek and fixtures

Expected Behavior

No missing pixels

Install Method

Self-Compiled

What version of WLED?

0.15.0-rc1 (build 2411250)

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dosipod dosipod added the bug label Dec 1, 2024
@DedeHai DedeHai self-assigned this Dec 1, 2024
@blazoncek
Copy link
Collaborator

FYI Blends is a 1D effect with limitations to accommodate ESP8266.

@softhack007
Copy link
Collaborator

softhack007 commented Dec 1, 2024

Looks like the effect should be "modernised" ... it creates a fastLed - style pixel buffer, which means the effect cannot handle more than 255 pixels in total.

I think the complete "pixels" buffer is not needed and it could be replaced by getPixelColor.

This loop could use getPixelColor instead of the pixels buffer

WLED/wled00/FX.cpp

Lines 4492 to 4495 in a121f5b

for (unsigned i = 0; i < pixelLen; i++) {
pixels[i] = color_blend(pixels[i], SEGMENT.color_from_palette(shift + quadwave8((i + 1) * 16), false, PALETTE_SOLID_WRAP, 255), blendSpeed);
shift += 3;
}

The second loop just writes the pixels back, and I think there is an off-by-one error here (should be if (offset >= pixLen) offset = 0

WLED/wled00/FX.cpp

Lines 4498 to 4501 in a121f5b

for (unsigned i = 0; i < SEGLEN; i++) {
SEGMENT.setPixelColor(i, pixels[offset++]);
if (offset > pixelLen) offset = 0;
}

@softhack007 softhack007 added the confirmed The bug is reproducable and confirmed label Dec 1, 2024
@dosipod
Copy link
Contributor Author

dosipod commented Dec 2, 2024

It is fixed now on MM

@softhack007
Copy link
Collaborator

Thanks, so I'll do the same patch in 0_15.
@DedeHai would you like to keep this report open, as a reminder for modernizing the logic?

softhack007 added a commit that referenced this issue Dec 2, 2024
fixing an off-by-one error to solve #4335
softhack007 added a commit that referenced this issue Dec 2, 2024
Hotfix for #4335 - solves missed pixel problem in blends effect
@softhack007 softhack007 added the fixed in source This issue is unsolved in the latest release but fixed in master label Dec 2, 2024
@dosipod
Copy link
Contributor Author

dosipod commented Dec 2, 2024

The two 16x16 and 32x16 fixtures I tested with in the beginning of the post are okay now without any missing pixels on effect default .

Below I would not call it a bug because ARC might be meant to behave this way so just to log test results with few scenarios ( I even like the last test with 32x16 having a hole in the middle )
image

You may close at your discretion

@blazoncek
Copy link
Collaborator

@dosipod that's a problem Arc expansion has on some dimensions of segments. But may be related to how that particular effect calculates its maximum dimension.

@dosipod
Copy link
Contributor Author

dosipod commented Dec 3, 2024

@blazoncek Yeah I see the same with multiple effects when using Arc so not an issue with Blends , as long as there is symmetry it is fine

blazoncek pushed a commit to blazoncek/WLED that referenced this issue Dec 3, 2024
fixing an off-by-one error to solve Aircoookie#4335
@DedeHai
Copy link
Collaborator

DedeHai commented Dec 3, 2024

i would you like to keep this report open, as a reminder for modernizing the logic?

does it need modernizing? it will change the looks if you remove the buffer (on all setups that have global buffer disabled), not sure its worth it.

blazoncek pushed a commit to blazoncek/WLED that referenced this issue Dec 12, 2024
fixing an off-by-one error to solve Aircoookie#4335
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed The bug is reproducable and confirmed fixed in source This issue is unsolved in the latest release but fixed in master
Projects
None yet
Development

No branches or pull requests

4 participants