Code cleanup

- Fixed bug with wrong keys bound to tab
- cleaned up Luna and OLED code
This commit is contained in:
Victor 2024-06-21 23:24:18 -05:00
parent 8a520c259d
commit ce420c5f29
Failed to generate hash of commit
4 changed files with 5 additions and 16 deletions

View file

@ -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_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 {

View file

@ -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_osm = get_oneshot_mods();
@ -47,25 +47,14 @@ void animate_luna(int col, int line) {
// Animate based on status
if (host_keyboard_led_state().caps_lock || is_caps_word_on()) {
oled_write_raw_P(bark[luna_current_frame], OLED_LUNA_ANIM_SIZE);
} else if ((current_mod | current_osm) & MOD_MASK_CTRL) {
oled_write_raw_P(sneak[luna_current_frame], OLED_LUNA_ANIM_SIZE);
} else if (get_current_wpm() <= OLED_LUNA_MIN_WALK_SPEED) {
oled_write_raw_P(sit[luna_current_frame], OLED_LUNA_ANIM_SIZE);
} else if (get_current_wpm() <= OLED_LUNA_MIN_RUN_SPEED) {
oled_write_raw_P(walk[luna_current_frame], OLED_LUNA_ANIM_SIZE);
} else {
oled_write_raw_P(run[luna_current_frame], OLED_LUNA_ANIM_SIZE);
}
}
}

View file

@ -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
void render_luna(void);
void animate_luna(int col, int line);
void animate_luna(uint8_t col, uint8_t line);
// Luna Sit
static const char PROGMEM sit[2][OLED_LUNA_ANIM_SIZE] = {

View file

@ -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_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_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);