-
-
Notifications
You must be signed in to change notification settings - Fork 39.4k
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
[Keymap] Improvements to KidBrazil keymap to better handle OLED/LED Matrix timeout. #7688
[Keymap] Improvements to KidBrazil keymap to better handle OLED/LED Matrix timeout. #7688
Conversation
-Custom Font -Custom OLED output
* Setup Oled timeout based on simple timer * Cleaned up comments and added timeout for LEDs * Fixed some small errors * Updated oled timout with matrix scan * Updated oled timout with matrix scan * Update withou eeprom * Update timer code * Use process user instead of keymap * Added ifdef to protect oledtimer * Updated with half timeout state for logo * Removed middle tier timer
- Added boolean to hold LED state - Added init function to set rgb to known state - Modified RGB_TOG to work with noeeprom commands
16b5997
to
19e7051
Compare
Co-Authored-By: James Young <[email protected]>
@noroadsleft I commited your suggestion via the browser, not sure it took yet. Cant seem to see it on the diff so I will fix it manually and request a review again. Cheers |
user has disabled it via RGB_TOG. | ||
|
||
## Flashing | ||
To flash this on your CRKBD simply use the `make crkbd:kidbrazil:flash` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it worked!
Thanks! |
…atrix timeout. (qmk#7688) * Added KidBrazil custom keymap for CRKBD -Custom Font -Custom OLED output * Added missing readme * Oled Timeout Update for KidBrazil Keymap (qmk#1) * Setup Oled timeout based on simple timer * Cleaned up comments and added timeout for LEDs * Fixed some small errors * Updated oled timout with matrix scan * Updated oled timout with matrix scan * Update withou eeprom * Update timer code * Use process user instead of keymap * Added ifdef to protect oledtimer * Updated with half timeout state for logo * Removed middle tier timer * Final cleanup of unused files * Updated code as per suggestions & requests * Second round of revisions * Updated keymap to better handle LED timeout - Added boolean to hold LED state - Added init function to set rgb to known state - Modified RGB_TOG to work with noeeprom commands * Finished adding the timeout for OLED and testing on CRKBD * Updated documentation * fixed the timeout logic so it works as intended * Update keyboards/crkbd/keymaps/kidbrazil/README.md
…atrix timeout. (qmk#7688) * Added KidBrazil custom keymap for CRKBD -Custom Font -Custom OLED output * Added missing readme * Oled Timeout Update for KidBrazil Keymap (qmk#1) * Setup Oled timeout based on simple timer * Cleaned up comments and added timeout for LEDs * Fixed some small errors * Updated oled timout with matrix scan * Updated oled timout with matrix scan * Update withou eeprom * Update timer code * Use process user instead of keymap * Added ifdef to protect oledtimer * Updated with half timeout state for logo * Removed middle tier timer * Final cleanup of unused files * Updated code as per suggestions & requests * Second round of revisions * Updated keymap to better handle LED timeout - Added boolean to hold LED state - Added init function to set rgb to known state - Modified RGB_TOG to work with noeeprom commands * Finished adding the timeout for OLED and testing on CRKBD * Updated documentation * fixed the timeout logic so it works as intended * Update keyboards/crkbd/keymaps/kidbrazil/README.md
if (record->event.pressed) { | ||
#ifdef OLED_DRIVER_ENABLE | ||
oled_timer = timer_read32(); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a logic bug here. Although the variable is named oled_timer
, it's used to timeout both the RGB Matrix and the OLEDs. As it's written, disabling the OLEDs will break the RGB Matrix timeout because oled_timer
will not be set.
To resolve it, I recommend renaming oled_timer
to timeout_timer
and remove the conditional ifdef
here.
Description
The purpose of this PR is to improve the behaviour of the OLED and LED Matrix timeouts introduced in the original PR for this keymap. With this PR the user will actually be able to toggle the RGB matrix on/off and have it stay that way when the keyboard wakes up.
Apparently rgbmatrix info is not readily available to pull from the eeprom so my approach was to initialize the keyboard to a known state and use some volatile booleans to store the current state while the keyboard is powered up.
Types of Changes
Checklist