From ce420c5f2982df7923b2cee30850c5b99ca39d68 Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 21 Jun 2024 23:24:18 -0500 Subject: [PATCH] Code cleanup - Fixed bug with wrong keys bound to tab - cleaned up Luna and OLED code --- users/t4corun/features/combo.h | 2 +- users/t4corun/features/luna.c | 15 ++------------- users/t4corun/features/luna.h | 2 +- users/t4corun/features/oled.h | 2 +- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/users/t4corun/features/combo.h b/users/t4corun/features/combo.h index 826c69ba..aa10356b 100644 --- a/users/t4corun/features/combo.h +++ b/users/t4corun/features/combo.h @@ -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 { diff --git a/users/t4corun/features/luna.c b/users/t4corun/features/luna.c index 9a410e6a..e0caa726 100644 --- a/users/t4corun/features/luna.c +++ b/users/t4corun/features/luna.c @@ -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); - } - -} \ No newline at end of file +} \ No newline at end of file diff --git a/users/t4corun/features/luna.h b/users/t4corun/features/luna.h index b9cad546..7e85c35e 100644 --- a/users/t4corun/features/luna.h +++ b/users/t4corun/features/luna.h @@ -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] = { diff --git a/users/t4corun/features/oled.h b/users/t4corun/features/oled.h index 24b8785f..fde8e92a 100644 --- a/users/t4corun/features/oled.h +++ b/users/t4corun/features/oled.h @@ -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);