mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-05-08 00:24:16 -04:00
Code cleanup
- Fixed bug with wrong keys bound to tab - cleaned up Luna and OLED code
This commit is contained in:
parent
8a520c259d
commit
ce420c5f29
4 changed files with 5 additions and 16 deletions
|
@ -12,7 +12,7 @@ const uint16_t PROGMEM mou_drg_combo[] = { KC_X, KC_C, COMBO_END };
|
||||||
|
|
||||||
const uint16_t PROGMEM key_ent_combo[] = { KC_C, KC_V, COMBO_END };
|
const uint16_t PROGMEM key_ent_combo[] = { KC_C, KC_V, COMBO_END };
|
||||||
const uint16_t PROGMEM key_bspc_combo[] = { KC_M, TR_COMM, COMBO_END };
|
const uint16_t PROGMEM key_bspc_combo[] = { KC_M, TR_COMM, COMBO_END };
|
||||||
const uint16_t PROGMEM key_tab_combo[] = { KC_J, KC_V, COMBO_END };
|
const uint16_t PROGMEM key_tab_combo[] = { KC_J, KC_K, COMBO_END };
|
||||||
|
|
||||||
|
|
||||||
enum combos {
|
enum combos {
|
||||||
|
|
|
@ -22,7 +22,7 @@ void render_luna(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void animate_luna(int col, int line) {
|
void animate_luna(uint8_t col, uint8_t line) {
|
||||||
|
|
||||||
uint8_t current_mod = get_mods();
|
uint8_t current_mod = get_mods();
|
||||||
uint8_t current_osm = get_oneshot_mods();
|
uint8_t current_osm = get_oneshot_mods();
|
||||||
|
@ -47,25 +47,14 @@ void animate_luna(int col, int line) {
|
||||||
|
|
||||||
// Animate based on status
|
// Animate based on status
|
||||||
if (host_keyboard_led_state().caps_lock || is_caps_word_on()) {
|
if (host_keyboard_led_state().caps_lock || is_caps_word_on()) {
|
||||||
|
|
||||||
oled_write_raw_P(bark[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
oled_write_raw_P(bark[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
||||||
|
|
||||||
} else if ((current_mod | current_osm) & MOD_MASK_CTRL) {
|
} else if ((current_mod | current_osm) & MOD_MASK_CTRL) {
|
||||||
|
|
||||||
oled_write_raw_P(sneak[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
oled_write_raw_P(sneak[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
||||||
|
|
||||||
} else if (get_current_wpm() <= OLED_LUNA_MIN_WALK_SPEED) {
|
} else if (get_current_wpm() <= OLED_LUNA_MIN_WALK_SPEED) {
|
||||||
|
|
||||||
oled_write_raw_P(sit[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
oled_write_raw_P(sit[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
||||||
|
|
||||||
} else if (get_current_wpm() <= OLED_LUNA_MIN_RUN_SPEED) {
|
} else if (get_current_wpm() <= OLED_LUNA_MIN_RUN_SPEED) {
|
||||||
|
|
||||||
oled_write_raw_P(walk[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
oled_write_raw_P(walk[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
oled_write_raw_P(run[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
oled_write_raw_P(run[luna_current_frame], OLED_LUNA_ANIM_SIZE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -17,7 +17,7 @@
|
||||||
#define OLED_LUNA_ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024
|
#define OLED_LUNA_ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024
|
||||||
|
|
||||||
void render_luna(void);
|
void render_luna(void);
|
||||||
void animate_luna(int col, int line);
|
void animate_luna(uint8_t col, uint8_t line);
|
||||||
|
|
||||||
// Luna Sit
|
// Luna Sit
|
||||||
static const char PROGMEM sit[2][OLED_LUNA_ANIM_SIZE] = {
|
static const char PROGMEM sit[2][OLED_LUNA_ANIM_SIZE] = {
|
||||||
|
|
|
@ -32,9 +32,9 @@ void render_default_layer_state(uint8_t col, uint8_t line, bool moveCursor);
|
||||||
void render_layer_state(uint8_t col, uint8_t line, bool moveCursor);
|
void render_layer_state(uint8_t col, uint8_t line, bool moveCursor);
|
||||||
void render_layer_state_list(uint8_t col, uint8_t line, bool moveCursor);
|
void render_layer_state_list(uint8_t col, uint8_t line, bool moveCursor);
|
||||||
|
|
||||||
void render_keylock_status(uint8_t col, uint8_t line);
|
|
||||||
void render_mod_status(uint8_t col, uint8_t line);
|
void render_mod_status(uint8_t col, uint8_t line);
|
||||||
void render_mod_status_vertical(uint8_t col, uint8_t line);
|
void render_mod_status_vertical(uint8_t col, uint8_t line);
|
||||||
|
void render_keylock_status(uint8_t col, uint8_t line);
|
||||||
|
|
||||||
void render_klor_face_small(uint8_t col, uint8_t line);
|
void render_klor_face_small(uint8_t col, uint8_t line);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue