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

[Bug] 0.14.33 breaks backlight levels #15331

Closed
3 tasks
karlshea opened this issue Nov 28, 2021 · 4 comments · Fixed by #15344
Closed
3 tasks

[Bug] 0.14.33 breaks backlight levels #15331

karlshea opened this issue Nov 28, 2021 · 4 comments · Fixed by #15344

Comments

@karlshea
Copy link

karlshea commented Nov 28, 2021

Describe the Bug

I have a higher number of backlight levels (20) so it's more obvious, but even a smaller number shows this behavior: increasing/decreasing the backlight levels jumps the light intensity all over the place (e.g. starting from backlight level 0 -> intensity 0, 1 -> intensity 50 (estimated), 2 -> intensity 10, 3 -> intensity 200, 4 -> intensity 50, 5 -> intensity 190).

0.14.32 works normally. If I check out the first commit (b47bdee ) after that tag it starts to break.

System Information

  • Keyboard: Both KBDfans KBD75 rev2 and Treasure type9s2 show this behavior.
  • Operating system: macOS
  • AVR GCC version:
  • ARM GCC version:
  • QMK Firmware version:
  • Any keyboard related software installed?
    • AutoHotKey
    • Karabiner
    • Other:

Additional Context

Building using latest qmkfm/qmk_cli Docker image.

@tzarc
Copy link
Member

tzarc commented Nov 28, 2021

Do you know how to do a git bisect?

@karlshea
Copy link
Author

karlshea commented Nov 28, 2021

I didn't, but now I do, it says e0a5056 is the first bad commit.

Edit: confirmed, if I check out 0.14.33 but replace quantum/backlight/backlight_avr.c with the version prior to that commit, everything works fine.

Edit 2: Since many of the changes in the PR (#7521) seem to be related to backlight breathing, just wanted to clarify that I'm not using breathing, it's just a static level.

@karlshea
Copy link
Author

It's something to do with cie_lightness(). If I revert just those changes it works fine too.

@karlshea
Copy link
Author

Figured it out, it's losing bits doing division.

zvecr added a commit that referenced this issue Nov 29, 2021
…#15344)

* Fix bit loss in cie_lightness() when doing division.

* Use the right types

* Format

Co-authored-by: zvecr <[email protected]>
rudism pushed a commit to rudism/qmk_firmware that referenced this issue Jan 16, 2022
 (qmk#15344)

* Fix bit loss in cie_lightness() when doing division.

* Use the right types

* Format

Co-authored-by: zvecr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants