-
-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Conversation
Actually, I would recommend reverting this change. You can save ~1.5K by making a simple change to how the WPM is rendered. qmk_firmware/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c Lines 164 to 165 in 336c8d3
change this to: uint8_t n = get_current_wpm();
char wpm_counter[4];
wpm_counter[3] = '\0';
wpm_counter[2] = '0' + n % 10;
wpm_counter[1] = '0' + (n /= 10) % 10;
wpm_counter[0] = '0' + n / 10 ;
oled_write_P(PSTR("WPM: "), false);
oled_write(wpm_counter, false); You can remove the stdio.h include at the beginning of the file too. This will maintain identical functionality, but use a lot less program memory. |
Ayoooo, great feedback! Thanks for the heads up. I'll close this PR and revert + resubmit. That's a much better solution. |
no need to have closed the PR. Changes to the branch would be reflected. And yeah, for such a "simple" change, it's a huge savings! Been recommending it on any new PRs I've seen since it's such a big change. |
🤦♂️ I should stay away from PRs late at night. Thanks! Will update. Appreciate the input and help as always @drashna 👍 |
I totally understand that feeling. And welcome! |
708fa7b
to
05637a7
Compare
Thanks! |
Description
Changed WPM counter string builder in order to get the nibble oled_bongocat keymap to compile (thanks to @drashna for the clever optimization).
Types of Changes
Issues Fixed or Closed by This PR
N/A
Checklist