qmk_firmware icon indicating copy to clipboard operation
qmk_firmware copied to clipboard

Fix RGBLIGHT_SLEEP for split keyboards

Open mikastiv opened this issue 1 year ago • 2 comments

Make the slave keyboard turn off rgb lights when master is suspended.

Description

This change fixes an issue I got where the slave half of my keyboard would always stay on when I shutdown my PC. I had this issue when using RGBLIGHT_SLEEP and it was also happening when using RGB_DISABLE_WHEN_USB_SUSPENDED. This change fixes both of them.

My only concerns with this change, is that I was thinking it could have side effects like maybe draining the battery quicker on wireless keyboards, since now it's doing matrix scan in a loop when suspended. I can't test this since my keyboard is wired. I'd love feedback on this 🙂

For context my keyboard is a corne using pro micro clones

Types of Changes

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

Issues Fixed or Closed by This PR

  • Fixes #22794

Checklist

  • [x] My code follows the code style of this project: C, Python
  • [x] 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.
  • [x] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.
  • [x] I have tested the changes and verified that they work and don't break anything (as well as I can manage).

mikastiv avatar Jan 22 '24 01:01 mikastiv

Thank you for your contribution! This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready. For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

github-actions[bot] avatar Mar 09 '24 01:03 github-actions[bot]

Thank you for your contribution! This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready. For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

github-actions[bot] avatar Apr 27 '24 01:04 github-actions[bot]

Thank you for your contribution! This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. // [stale-action-closed]

github-actions[bot] avatar May 27 '24 01:05 github-actions[bot]

Can this PR be revived?

JuanoD avatar Jul 29 '24 15:07 JuanoD

#24055 should cover the same use case, be it a very slightly different implementation.

zvecr avatar Jul 29 '24 15:07 zvecr

Ok. Thank you for answering. Then, it is just a matter of time for it to make it into master.

JuanoD avatar Jul 29 '24 16:07 JuanoD