-
-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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] Update bcat's keymaps/userspace to share logic, add OLED functionality, and set up one of my macropads for WFH #14702
Conversation
Good job! I'm happy for you to keep luna as a name 👍🏼 |
Sounds good, thanks much for the idea & original implementation! |
I wasn't expecting all the attention that it got to be honest but, I'm glad that a lot of people liked it. If you have a video of it working I'll be happy to see it 😄 |
Thanks for the review! BTW, the review email I got showed a change to |
I went ahead and incorporated a simplified version of the logic from the email. It doesn't explicitly check for a missing file in the makefile, but instead just lets it linker error like so:
I feel like the error is clear enough that that's fine in practice, though. |
I removed it, because I ran into issues with it, and ... yeah. |
And it quick check looks like this may be what you want to actually check if the file exists. ifneq ("$(wildcard $(USER_PATH)/bcat_oled_pet_$(BCAT_OLED_PET).c)","") |
Do you mind if I leave this out? I feel like it's a little cleaner to have a build error if the But I don't feel strongly about this, so if you do have a preference I'll go with whatever you suggest. |
Well, you can have it generate an error if it's not found, etc. But this should be fine. Mostly, it was to allow for a simple way to add more. |
Rebased against latest master and resolved the merge conflict. Everything still builds okay. :) |
Sorry, but again? |
No worries, all good. Everything should be re-merged now. By the way, I also have a new keymap for the Unicorne keyboard ready: bcat@a8ed985. I had left it out of this PR since the Unicorne keyboard was in various stages of "not merged yet" and "doesn't compile" for a bit. But now the Unicorne keyboard is working fine at HEAD, and I wasn't sure if I should add my keymap for it to this PR, or if it would be better to make a separate (much smaller) PR after this one is merged. No preference on my end, and I'm not in any rush on this. :) Just figured I'd ask which option is preferable. |
i'd say wait for it, or open up another pr. |
Sounds good, I'll just wait till this is merged then. (Again, no rush from my end, and I know there's a big backlog of PRs. So I don't mind waiting.) |
Luna artwork and original implementation by HellSingCoder, licensed under GPL v2.0. See also: https://github.com/qmk/qmk_firmware/blob/6dfe915e26d7147e6c2bed495d3b01cf5b21e6ec/keyboards/sofle/keymaps/helltm/keymap.c
I had to turn off a few unused features to address firmware size limits.
This enables OLED pets to draw custom widgets (e.g., LED indicator status) on top of their animation frames.
For future use on my Unicorne keyboard. Unicorn artwork by sparrow666, licensed under GPL v2.0. See also: https://opengameart.org/content/unicorn-2
The default implementation never lets the OLED turn off if a continuous animation is in progress. The custom one does.
No change in firmware size, but makes keymaps read a little nicer and enables more functionality in OLED pets.
The new extensible split transport for Split Common finally allows OLED on/off status to be synced between halves of the keyboard. :) Unfortunately, this required disabling Bootmagic Lite to keep my Crkbd under the firmware size limit. (I now after 28 bytes free on avr-gcc version 8.5.0.) So now I'll enable Bootmagic only on keyboards that actually require it, i.e., ones lacking an accessible reset button.
Co-authored-by: Drashna Jaelre <drashna@live.com>
The default max brightness is only 120 rather than 150, but that might actually fix some weirdness I've seen with bright white LED settings.
The general trend these days seems to be enabling only the modes you want, so I'm manually expanding the ones currently enabled by RGBLIGHT_ANIMATIONS. I'd like to try out the TWINKLE mode too, but it seems not to work at all on ARM right now, and all my usable RGBLIGHT keebs are ARM boards.
My Crkbd still has a reasonable amount of free space with these: 27974/28672 (97%, 698 bytes free). The RGB_MATRIX_KEYPRESSES effects would put it over the firmware size limit, but I really don't ever use those anyway.
Just one more rebase atop master, no extra changes. Nothing to see here... :) |
…ctionality, and set up one of my macropads for WFH (qmk#14702) * Add script to build all bcat keymaps at once * Move userspace RGB to separate source file * Move layer handling logic into userspace * Move keycap aliases into userspace * Add OLED userspace library and Lily58 OLED setup * Add Luna keyboard pet, generic OLED pet framework Luna artwork and original implementation by HellSingCoder, licensed under GPL v2.0. See also: https://github.com/qmk/qmk_firmware/blob/6dfe915e26d7147e6c2bed495d3b01cf5b21e6ec/keyboards/sofle/keymaps/helltm/keymap.c * Use OLED on bcat's Crkbd I had to turn off a few unused features to address firmware size limits. * Remove vestigial NK_TOGG keybindings * Add post-render hook to OLED pet API This enables OLED pets to draw custom widgets (e.g., LED indicator status) on top of their animation frames. * Add Isda keyboard pet For future use on my Unicorne keyboard. Unicorn artwork by sparrow666, licensed under GPL v2.0. See also: https://opengameart.org/content/unicorn-2 * Replace OLED timeout implementation with custom The default implementation never lets the OLED turn off if a continuous animation is in progress. The custom one does. * Move keyboard state for OLED functions into struct No change in firmware size, but makes keymaps read a little nicer and enables more functionality in OLED pets. * Enable continuously running OLED pet (for Luna) * Sync OLED state; enable Bootmagic only when needed The new extensible split transport for Split Common finally allows OLED on/off status to be synced between halves of the keyboard. :) Unfortunately, this required disabling Bootmagic Lite to keep my Crkbd under the firmware size limit. (I now after 28 bytes free on avr-gcc version 8.5.0.) So now I'll enable Bootmagic only on keyboards that actually require it, i.e., ones lacking an accessible reset button. * Update 9-Key macropad keymap for working from home * Remove includes redundant with quantum.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Simplify BCAT_OLED_PET makefile logic * Swap some keys on my 9-Key macropad around * Inline spurious variable in OLED code * Remove max brightness that's now set by default The default max brightness is only 120 rather than 150, but that might actually fix some weirdness I've seen with bright white LED settings. * Enable specific RGBLIGHT modes instead of default The general trend these days seems to be enabling only the modes you want, so I'm manually expanding the ones currently enabled by RGBLIGHT_ANIMATIONS. I'd like to try out the TWINKLE mode too, but it seems not to work at all on ARM right now, and all my usable RGBLIGHT keebs are ARM boards. * Reenable RGB_MATRIX animations after qmk#15018 My Crkbd still has a reasonable amount of free space with these: 27974/28672 (97%, 698 bytes free). The RGB_MATRIX_KEYPRESSES effects would put it over the firmware size limit, but I really don't ever use those anyway. * Use new get_u8_str function for WPM display Co-authored-by: Drashna Jaelre <drashna@live.com>
…ctionality, and set up one of my macropads for WFH (qmk#14702) * Add script to build all bcat keymaps at once * Move userspace RGB to separate source file * Move layer handling logic into userspace * Move keycap aliases into userspace * Add OLED userspace library and Lily58 OLED setup * Add Luna keyboard pet, generic OLED pet framework Luna artwork and original implementation by HellSingCoder, licensed under GPL v2.0. See also: https://github.com/qmk/qmk_firmware/blob/6dfe915e26d7147e6c2bed495d3b01cf5b21e6ec/keyboards/sofle/keymaps/helltm/keymap.c * Use OLED on bcat's Crkbd I had to turn off a few unused features to address firmware size limits. * Remove vestigial NK_TOGG keybindings * Add post-render hook to OLED pet API This enables OLED pets to draw custom widgets (e.g., LED indicator status) on top of their animation frames. * Add Isda keyboard pet For future use on my Unicorne keyboard. Unicorn artwork by sparrow666, licensed under GPL v2.0. See also: https://opengameart.org/content/unicorn-2 * Replace OLED timeout implementation with custom The default implementation never lets the OLED turn off if a continuous animation is in progress. The custom one does. * Move keyboard state for OLED functions into struct No change in firmware size, but makes keymaps read a little nicer and enables more functionality in OLED pets. * Enable continuously running OLED pet (for Luna) * Sync OLED state; enable Bootmagic only when needed The new extensible split transport for Split Common finally allows OLED on/off status to be synced between halves of the keyboard. :) Unfortunately, this required disabling Bootmagic Lite to keep my Crkbd under the firmware size limit. (I now after 28 bytes free on avr-gcc version 8.5.0.) So now I'll enable Bootmagic only on keyboards that actually require it, i.e., ones lacking an accessible reset button. * Update 9-Key macropad keymap for working from home * Remove includes redundant with quantum.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Simplify BCAT_OLED_PET makefile logic * Swap some keys on my 9-Key macropad around * Inline spurious variable in OLED code * Remove max brightness that's now set by default The default max brightness is only 120 rather than 150, but that might actually fix some weirdness I've seen with bright white LED settings. * Enable specific RGBLIGHT modes instead of default The general trend these days seems to be enabling only the modes you want, so I'm manually expanding the ones currently enabled by RGBLIGHT_ANIMATIONS. I'd like to try out the TWINKLE mode too, but it seems not to work at all on ARM right now, and all my usable RGBLIGHT keebs are ARM boards. * Reenable RGB_MATRIX animations after qmk#15018 My Crkbd still has a reasonable amount of free space with these: 27974/28672 (97%, 698 bytes free). The RGB_MATRIX_KEYPRESSES effects would put it over the firmware size limit, but I really don't ever use those anyway. * Use new get_u8_str function for WPM display Co-authored-by: Drashna Jaelre <drashna@live.com>
Description
There's a few changes here that I've been testing over the past several months and that I'd like to go ahead and merge before anything bit rots too much. I can split this into smaller PRs if that's preferable, just let me know.
Unfortunately, my Corne keymap is getting a bit big, and is now oversized on avr-gcc 5.4.0 that Debian Bullseye ships with. I managed to squeak just under the limit (just 28 bytes to spare!) with an avr-gcc 8.5.0 Linux toolchain built by Lumito, but will probably need something likeNO_ACTION_TAPPING
(with the layer fixes from #11528) if core grows any bigger. Or maybe I should just give up some RGB modes.... :)After merging in latest QMK changes, it seems I've got a fair number of bytes left for my Crkbd (712 bytes free with avr-gcc 8.5.0). :)
First, some organizational improvements and cleanups:
users/bcat/compile.sh
) to my userspace to build all the keyboard/keymap combos I use. This makes it easy to test changes and make sure I'm not breaking anything, as well as to rebuild all my firmware binaries after pulling latest QMK master into my fork.BCAT_ORTHO_LAYERS
macro controls which set of layers is used.)NK_TOGG
keybindings since I useFORCE_NKRO
now. (It "just works" on all my hardware, even in BIOS.)Second, the addition of an OLED library to my userspace:
oled_task_user
implementation across keymaps. I added a few weak functions to my userspace following the pattern established by QMK core.SPLIT_OLED_ENABLE
feature to sync OLED on/off status set by the custom timeout impl between halves of the keyboard. :)Third, implemented a couple of "keyboard pets" in my userspace framework using open-source artwork:
However, if HellSingCoder would rather I rename theAnd he's good with the naming too. :D)bcat_oled_pet_luna.c
file to something else to make it extra clear this isn't his canonical version, I'd be happy to do that too.bcat_oled_pet_isda.c
) is just a reference to a D&D campaign I play in. :)Finally, actual functional changes to keymaps:
Types of Changes
Issues Fixed or Closed by This PR
None
Checklist