fix: improper usage of keyboard/user-level functions (#22652)
This commit is contained in:
parent
05d2b7e2ac
commit
49527afc6a
6 changed files with 182 additions and 161 deletions
|
|
@ -20,18 +20,21 @@
|
|||
#include "lib/bongocat.h"
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_kb(void) {
|
||||
led_t led_usb_state = host_keyboard_led_state();
|
||||
|
||||
render_bongocat();
|
||||
oled_set_cursor(14, 0); // sets cursor to (column, row) using charactar spacing (4 rows on 128x32 screen, anything more will overflow back to the top)
|
||||
oled_write_P(PSTR("WPM:"), false);
|
||||
oled_write(get_u8_str(get_current_wpm(), '0'), false); // writes wpm on top right corner of string
|
||||
oled_set_cursor(17, 2);
|
||||
oled_write_P(led_usb_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false);
|
||||
oled_set_cursor(17, 3);
|
||||
oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false);
|
||||
|
||||
return true;
|
||||
bool oled_task_kb(void) {
|
||||
if (!oled_task_user()) {
|
||||
return false;
|
||||
}
|
||||
led_t led_usb_state = host_keyboard_led_state();
|
||||
|
||||
render_bongocat();
|
||||
oled_set_cursor(14, 0); // sets cursor to (column, row) using charactar spacing (4 rows on 128x32 screen, anything more will overflow back to the top)
|
||||
oled_write_P(PSTR("WPM:"), false);
|
||||
oled_write(get_u8_str(get_current_wpm(), '0'), false); // writes wpm on top right corner of string
|
||||
oled_set_cursor(17, 2);
|
||||
oled_write_P(led_usb_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false);
|
||||
oled_set_cursor(17, 3);
|
||||
oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false);
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue