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

[Keymap] Update bcat's keymaps/userspace to share logic, add OLED functionality, and set up one of my macropads for WFH #14702

Merged
merged 23 commits into from
Dec 27, 2021
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8084c71
Add script to build all bcat keymaps at once
bcat Jun 20, 2021
8083630
Move userspace RGB to separate source file
bcat Jun 20, 2021
fb73247
Move layer handling logic into userspace
bcat Jun 20, 2021
0e27a3e
Move keycap aliases into userspace
bcat Jun 20, 2021
38eaf30
Add OLED userspace library and Lily58 OLED setup
bcat Jun 20, 2021
2c940d5
Add Luna keyboard pet, generic OLED pet framework
bcat Jun 20, 2021
d42d567
Use OLED on bcat's Crkbd
bcat Jun 20, 2021
eed58f2
Remove vestigial NK_TOGG keybindings
bcat Jun 20, 2021
0f0f71d
Add post-render hook to OLED pet API
bcat Jun 21, 2021
a68cdac
Add Isda keyboard pet
bcat Jun 21, 2021
45d6909
Replace OLED timeout implementation with custom
bcat Jun 23, 2021
bc95ebb
Move keyboard state for OLED functions into struct
bcat Jun 23, 2021
e07d941
Enable continuously running OLED pet (for Luna)
bcat Jun 26, 2021
23930f6
Sync OLED state; enable Bootmagic only when needed
bcat Oct 4, 2021
bf46471
Update 9-Key macropad keymap for working from home
bcat Oct 4, 2021
e0f292e
Remove includes redundant with quantum.h
bcat Oct 5, 2021
2ab419b
Simplify BCAT_OLED_PET makefile logic
bcat Oct 5, 2021
aada1c1
Swap some keys on my 9-Key macropad around
bcat Oct 8, 2021
d13f869
Inline spurious variable in OLED code
bcat Nov 24, 2021
1d18c9d
Remove max brightness that's now set by default
bcat Nov 24, 2021
cfcffdd
Enable specific RGBLIGHT modes instead of default
bcat Nov 28, 2021
0b9ae7b
Reenable RGB_MATRIX animations after #15018
bcat Nov 28, 2021
a3efc6b
Use new get_u8_str function for WPM display
bcat Nov 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use new get_u8_str function for WPM display
  • Loading branch information
bcat committed Dec 2, 2021
commit a3efc6b1bd3b59b2cc5cba39bc971f375205f33d
21 changes: 7 additions & 14 deletions users/bcat/bcat_oled.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,16 @@ void render_oled_wpm(uint8_t wpm) {
static uint32_t update_timeout = 0;

if (timer_expired32(timer_read32(), update_timeout)) {
char wpm_str[] = " ";
if (wpm > 0) {
wpm_str[2] = '0' + wpm % 10;
}
if (wpm >= 10) {
wpm_str[1] = '0' + wpm / 10 % 10;
}
if (wpm >= 100) {
wpm_str[0] = '0' + wpm / 100 % 10;
}

oled_advance_char();
oled_advance_char();
oled_write_P(wpm > 0 ? PSTR("WPM") : PSTR(" "), /*invert=*/false);
oled_advance_char();
oled_advance_char();
oled_write(wpm_str, /*invert=*/false);
if (wpm > 0) {
oled_advance_char();
oled_advance_char();
oled_write(get_u8_str(wpm, ' '), /*invert=*/false);
} else {
oled_advance_page(/*clearPageRemainder=*/true);
}

update_timeout = timer_read32() + UPDATE_MILLIS;
}
Expand Down