aboutsummaryrefslogtreecommitdiff
path: root/keyboards/nullbitsco
diff options
context:
space:
mode:
authorJay Greco <jayv.greco@gmail.com>2021-07-22 21:45:17 -0700
committerGitHub <noreply@github.com>2021-07-22 21:45:17 -0700
commita08c7087bef89b8b23e7462ece413a1861f8e4af (patch)
treee07e461a1777234905557f68a6231d299c9d9a9c /keyboards/nullbitsco
parentdfd795e48eda882320a50479adcfa9dddceec564 (diff)
downloadqmk_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.c15
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
23enum layer_names { 21enum layer_names {
24 _BASE, 22 _BASE,
@@ -97,7 +95,6 @@ uint32_t anim_timer = 0;
97uint32_t anim_sleep = 0; 95uint32_t anim_sleep = 0;
98uint8_t current_idle_frame = 0; 96uint8_t current_idle_frame = 0;
99 97
100char wpm_str[10];
101bool tap_anim = false; 98bool tap_anim = false;
102bool tap_anim_toggle = false; 99bool tap_anim_toggle = false;
103 100
@@ -161,8 +158,16 @@ static void render_anim(void) {
161void oled_task_user(void) { 158void 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