aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.c b/keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.c
index 1b132a9e6..c734e80ce 100644
--- a/keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.c
+++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/oled_display.c
@@ -13,7 +13,6 @@
13 * You should have received a copy of the GNU General Public License 13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#include <stdio.h>
17#include "quantum.h" 16#include "quantum.h"
18#include "oled_display.h" 17#include "oled_display.h"
19 18
@@ -62,11 +61,14 @@ void process_record_keymap_oled(uint16_t keycode) {
62} 61}
63 62
64void render_wpm(void) { 63void render_wpm(void) {
65 char wpm_str[10]; 64 uint8_t n = get_current_wpm();
66 65 char wpm_counter[4];
67 sprintf(wpm_str, "%03d", get_current_wpm()); 66 wpm_counter[3] = '\0';
67 wpm_counter[2] = '0' + n % 10;
68 wpm_counter[1] = '0' + (n /= 10) % 10;
69 wpm_counter[0] = '0' + n / 10 ;
68 oled_write_P(PSTR(" "), false); 70 oled_write_P(PSTR(" "), false);
69 oled_write(wpm_str, false); 71 oled_write(wpm_counter, false);
70} 72}
71 73
72void render_idle(void) { 74void render_idle(void) {