summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-07-21 12:45:28 +0000
committerQMK Bot <hello@qmk.fm>2022-07-21 12:45:28 +0000
commit6081a8091ddef75be98cae8ccb64b83c2e5c6306 (patch)
tree3e6435c077d07873833eab3a03887fa06486e17f
parentd510e80b89b5de54d60ff1a3dc1cca0307161fad (diff)
parent7f0581cd3520a22fbec7994ee122d6a253272392 (diff)
Merge remote-tracking branch 'origin/master' into develop
-rwxr-xr-xkeyboards/mechwild/mercutio/keymaps/jonavin/keymap.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
index 869a9f73ab..e4d0ab49ef 100755
--- a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
+++ b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c
@@ -17,7 +17,6 @@
#include QMK_KEYBOARD_H
-#include <stdio.h>
#include "jonavin.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -54,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
Defaults never changes if no encoder present to change it
*/
typedef struct {
- char keydesc[6]; // this will be displayed on OLED
+ char keydesc[6]; // this will be displayed on OLED
uint16_t keycode; // this is the keycode that will be sent when activted
} keycodedescType;
@@ -69,7 +68,7 @@ static const keycodedescType PROGMEM keyselection[] = {
{"C-A-D", KC_CAD}, // Ctrl-Alt-Del
{"AltF4", KC_AF4},
{"PLAY", KC_MEDIA_PLAY_PAUSE},
- {"RESET", RESET}, // firmware flash mode
+ {"FLASH", RESET}, // firmware flash mode
};
#define MAX_KEYSELECTION sizeof(keyselection)/sizeof(keyselection[0])
@@ -201,15 +200,13 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
render_logo();
oled_set_cursor(8,2);
- char fn_str[12];
switch(get_selected_layer()){
case 0:
oled_write_P(PSTR("BASE"), false);
break;
case 1:
- sprintf(fn_str, "FN %5s", selectedkey_rec.keydesc);
- oled_write(fn_str, false);
- //oled_write_P(PSTR("FN "), false);
+ oled_write_P(PSTR("FN "), false);
+ oled_write(selectedkey_rec.keydesc, false);
break;
case 2:
oled_write_P(PSTR("LOWER"), false);
@@ -230,8 +227,8 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
oled_write_P(PSTR("Temp BASE"), false);
break;
case 1:
- sprintf(fn_str, "Temp FN %5s", selectedkey_rec.keydesc);
- oled_write(fn_str, false);
+ oled_write_P(PSTR("Temp FN "), false);
+ oled_write(selectedkey_rec.keydesc, false);
break;
case 2:
oled_write_P(PSTR("Temp LOWER"), false);
@@ -246,12 +243,11 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
led_t led_state = host_keyboard_led_state();
oled_set_cursor(8,0);
uint8_t wpm_count;
- char wpm_str[10];
wpm_count=get_current_wpm();
if (wpm_count > 020) { // how wpm when > 20
- sprintf(wpm_str, " WPM: %03d", wpm_count);
- oled_write(wpm_str, false);
+ oled_write_P(PSTR(" WPM: "), false);
+ oled_write(get_u8_str(wpm_count, ' '), false);
} else {
oled_write_P(PSTR(" JONAVIN "), false); // otherwise display keymap name
}