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

LED Matrix: Implement CIE1931 curve #12417

Merged
merged 1 commit into from Apr 7, 2021

Conversation

fauxpark
Copy link
Member

Description

Brightness changes are much nicer on the eyes now. Also tidying up a few other things in preparation for adding animations and updating the suspend- and split-related code.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@drashna
Copy link
Member

drashna commented Apr 3, 2021

To be honest, I really, really don't like the LED_DISABLE_WHEN_USB_SUSPENDED (or it's rgb sibbling), in how it's implemented.

Maybe have the function ifdef-ed, instead, and just have a single call.
eg:

void led_matrix_set_suspend_state(bool state) {
#ifdef LED_DISABLE_WHEN_USB_SUSPENDED
    if (state) {
        led_matrix_set_value_all(0);  // turn off all LEDs when suspending
    }
    g_suspend_state = state;
#endif
}

And shove the call into the core suspend/wake functions. This way, no code is needed in the keyboard or user levels. And you only need the single define (and not set to true or false).

@fauxpark
Copy link
Member Author

fauxpark commented Apr 3, 2021

Yeah, that's a good idea, but I think I'll hold off on that until LED Matrix is in sync with RGB Matrix, then they can both be improved as one.

@drashna
Copy link
Member

drashna commented Apr 3, 2021

Not a problem. It's been something that has been on my mind for a while now.

@tzarc tzarc requested a review from a team April 7, 2021 09:43
@fauxpark fauxpark merged commit 40c314f into qmk:develop Apr 7, 2021
@fauxpark fauxpark deleted the led-matrix-cie1931 branch April 7, 2021 10:06
nhongooi pushed a commit to nhongooi/qmk_firmware that referenced this pull request Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants