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

Full brightness on LED count change 2D Matrix #4005

Closed
1 task done
Blowntobytes opened this issue May 28, 2024 · 13 comments
Closed
1 task done

Full brightness on LED count change 2D Matrix #4005

Blowntobytes opened this issue May 28, 2024 · 13 comments
Labels
backburner low priority compared to other issues bug confirmed The bug is reproducable and confirmed fixed in source This issue is unsolved in the latest release but fixed in master

Comments

@Blowntobytes
Copy link

What happened?

When changing LED count for a 2D matrix, the panel goes to full brightness upon saving.

To Reproduce Bug

Simply change LED count. I went from 256 to 255 and panel went to full bright on saving.

Expected Behavior

Was hoping the panel would stay the same brightness as the slider indicated and from previous setting.

Install Method

Binary from WLED.me

What version of WLED?

0.15.0-b3

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
@blazoncek blazoncek added the backburner low priority compared to other issues label May 28, 2024
@freakintoddles2
Copy link
Contributor

@blazoncek this is a really annoying issue with 15.x builds, would be nice to have it addressed. It happens for me when changing seemingly anything in the led settings.

@blazoncek
Copy link
Collaborator

How many times do you change LED count?
Sorry, but backburner.

Copy link

github-actions bot commented Oct 1, 2024

Hey! This issue has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs.
Thank you for using WLED! ✨

@github-actions github-actions bot added the stale This issue will be closed soon because of prolonged inactivity label Oct 1, 2024
@DedeHai DedeHai added confirmed The bug is reproducable and confirmed and removed stale This issue will be closed soon because of prolonged inactivity labels Oct 1, 2024
@DedeHai
Copy link
Collaborator

DedeHai commented Oct 2, 2024

I looked into this bug as it is really annyoing. it changes the brightness every time the settings are saved, not only when ledcount changes, any change to LED settings triggers a full brightness.
here is what I found so far:
the global bri variable is not changed, it stays at the set level.
I hunted down where the bug was introduced but was unable to find which commits were pulled in with the merge-commit in question:
in commit acf6736 it still works, next commit 7c8df97 introduces this bug.

@blazoncek
Copy link
Collaborator

Have you checked different NPB versions?

@DedeHai
Copy link
Collaborator

DedeHai commented Oct 2, 2024

not yet. I first need to figure out what happened in 7c8df97 as the commit itself does not introduce any new code, but since its a merge commit it probably pulled a lot of stuff in right?
how can I compare full code?

@blazoncek
Copy link
Collaborator

That was just a merge of main branch to make it compatible for the opposite direction merge later on.
That did not bring anything bus related back into 0_15.

@DedeHai
Copy link
Collaborator

DedeHai commented Oct 2, 2024

That did not bring anything bus related back into 0_15.

if you have the time, try this:

  • check out the commit acf6736 (which is the last one that works). upload and go to LED settings: change any settings (i usually just change the value of the ABL) and save. Nothing bad happens
  • Now check out the next commit in the history 7c8df97 which is the merge commit. Repeat the steps of changing something, save. LEDs (adressable ones) will go full brightness.
    I still need to check if the ABL is also disregarded in this bug. If it is, this definitely must be fixed before 0.15 release.

@blazoncek
Copy link
Collaborator

  • LEDs (adressable ones) will go full brightness

That's because NPB is reinitialized. Perhaps all it needs is strip.setBrightness(bri);

@DedeHai
Copy link
Collaborator

DedeHai commented Oct 2, 2024

that would be an easy fix. I can test if that does the trick and it may very well work, as the brightness is fixed once I move the slider in the UI.
so in that merge commit: was the NPB updated to a newer version or how is it that all of a sudden this bug appears?

@blazoncek
Copy link
Collaborator

Bug found and mitigated.

@DedeHai
Copy link
Collaborator

DedeHai commented Oct 2, 2024

that was quick, thank you!
Did you figure out what change caused it?

blazoncek added a commit that referenced this issue Oct 2, 2024
@blazoncek
Copy link
Collaborator

yes, re-initialised NPB

@blazoncek blazoncek added the fixed in source This issue is unsolved in the latest release but fixed in master label Oct 2, 2024
softhack007 pushed a commit to MoonModules/WLED that referenced this issue Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backburner low priority compared to other issues 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