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

Reduce NIBBLE oled_bongocat keymap size so it compiles #13638

Merged
merged 4 commits into from
Jul 23, 2021
Merged
Changes from all commits
Commits
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
15 changes: 10 additions & 5 deletions keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
#include QMK_KEYBOARD_H
#include "animation_frames.h"
#include <stdio.h>


enum layer_names {
_BASE,
Expand Down Expand Up @@ -97,7 +95,6 @@ uint32_t anim_timer = 0;
uint32_t anim_sleep = 0;
uint8_t current_idle_frame = 0;

char wpm_str[10];
bool tap_anim = false;
bool tap_anim_toggle = false;

Expand Down Expand Up @@ -161,8 +158,16 @@ static void render_anim(void) {
void oled_task_user(void) {
render_anim();
oled_set_cursor(0, 14);
sprintf(wpm_str, ">%04d", get_current_wpm());
oled_write_ln(wpm_str, false);

uint8_t n = get_current_wpm();
char wpm_counter[6];
wpm_counter[5] = '\0';
wpm_counter[4] = '0' + n % 10;
wpm_counter[3] = '0' + (n /= 10) % 10;
wpm_counter[2] = '0' + n / 10 ;
wpm_counter[1] = '0';
wpm_counter[0] = '>';
oled_write_ln(wpm_counter, false);
}
#endif

Expand Down