diff options
author | Jay Greco <jayv.greco@gmail.com> | 2021-07-22 21:45:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-22 21:45:17 -0700 |
commit | a08c7087bef89b8b23e7462ece413a1861f8e4af (patch) | |
tree | e07e461a1777234905557f68a6231d299c9d9a9c /keyboards/nullbitsco | |
parent | dfd795e48eda882320a50479adcfa9dddceec564 (diff) | |
download | qmk_firmware-a08c7087bef89b8b23e7462ece413a1861f8e4af.tar.gz qmk_firmware-a08c7087bef89b8b23e7462ece413a1861f8e4af.zip |
[Keymap] Reduce NIBBLE oled_bongocat keymap size so it compiles (#13638)
Diffstat (limited to 'keyboards/nullbitsco')
-rw-r--r-- | keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c index 1d8559627..d9365f54b 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c | |||
@@ -17,8 +17,6 @@ | |||
17 | */ | 17 | */ |
18 | #include QMK_KEYBOARD_H | 18 | #include QMK_KEYBOARD_H |
19 | #include "animation_frames.h" | 19 | #include "animation_frames.h" |
20 | #include <stdio.h> | ||
21 | |||
22 | 20 | ||
23 | enum layer_names { | 21 | enum layer_names { |
24 | _BASE, | 22 | _BASE, |
@@ -97,7 +95,6 @@ uint32_t anim_timer = 0; | |||
97 | uint32_t anim_sleep = 0; | 95 | uint32_t anim_sleep = 0; |
98 | uint8_t current_idle_frame = 0; | 96 | uint8_t current_idle_frame = 0; |
99 | 97 | ||
100 | char wpm_str[10]; | ||
101 | bool tap_anim = false; | 98 | bool tap_anim = false; |
102 | bool tap_anim_toggle = false; | 99 | bool tap_anim_toggle = false; |
103 | 100 | ||
@@ -161,8 +158,16 @@ static void render_anim(void) { | |||
161 | void oled_task_user(void) { | 158 | void oled_task_user(void) { |
162 | render_anim(); | 159 | render_anim(); |
163 | oled_set_cursor(0, 14); | 160 | oled_set_cursor(0, 14); |
164 | sprintf(wpm_str, ">%04d", get_current_wpm()); | 161 | |
165 | oled_write_ln(wpm_str, false); | 162 | uint8_t n = get_current_wpm(); |
163 | char wpm_counter[6]; | ||
164 | wpm_counter[5] = '\0'; | ||
165 | wpm_counter[4] = '0' + n % 10; | ||
166 | wpm_counter[3] = '0' + (n /= 10) % 10; | ||
167 | wpm_counter[2] = '0' + n / 10 ; | ||
168 | wpm_counter[1] = '0'; | ||
169 | wpm_counter[0] = '>'; | ||
170 | oled_write_ln(wpm_counter, false); | ||
166 | } | 171 | } |
167 | #endif | 172 | #endif |
168 | 173 | ||