From 1929773f118b7b404c3df362696516e28524405a Mon Sep 17 00:00:00 2001 From: Dane Lipscombe Date: Wed, 2 Feb 2022 23:21:21 +1100 Subject: [PATCH] Fix corne oled not working (#111) Co-authored-by: Dane Lipscombe --- keyboards/crkbd/keymaps/vial/config.h | 20 ++++++++++++-------- keyboards/crkbd/keymaps/vial/keymap.c | 7 ++++--- keyboards/crkbd/keymaps/vial/rules.mk | 12 +++++++----- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/keyboards/crkbd/keymaps/vial/config.h b/keyboards/crkbd/keymaps/vial/config.h index 47b1cdada5..604e928071 100644 --- a/keyboards/crkbd/keymaps/vial/config.h +++ b/keyboards/crkbd/keymaps/vial/config.h @@ -39,13 +39,17 @@ along with this program. If not, see . // #define EE_HANDS #define USE_SERIAL_PD2 - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 27 -#define RGBLIGHT_LIMIT_VAL 120 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 +#ifdef RGBLIGHT_ENABLE +# undef RGBLED_NUM +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 54 +# undef RGBLED_SPLIT +# define RGBLED_SPLIT \ + { 27, 27 } +# define RGBLIGHT_LIMIT_VAL 120 +# define RGBLIGHT_HUE_STEP 10 +# define RGBLIGHT_SAT_STEP 17 +# define RGBLIGHT_VAL_STEP 17 +#endif #define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/keymaps/vial/keymap.c b/keyboards/crkbd/keymaps/vial/keymap.c index 4735255eae..12c86f6bbc 100644 --- a/keyboards/crkbd/keymaps/vial/keymap.c +++ b/keyboards/crkbd/keymaps/vial/keymap.c @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -158,13 +158,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -173,4 +174,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/vial/rules.mk b/keyboards/crkbd/keymaps/vial/rules.mk index caef3f6318..f9ca3783fd 100644 --- a/keyboards/crkbd/keymaps/vial/rules.mk +++ b/keyboards/crkbd/keymaps/vial/rules.mk @@ -1,9 +1,11 @@ -MOUSEKEY_ENABLE = no # Mouse keys -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -VIA_ENABLE = yes # Enable VIA -VIAL_ENABLE = yes # Enable VIAL -OLED_DRIVER_ENABLE = no +MOUSEKEY_ENABLE = no # Mouse keys +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +VIA_ENABLE = yes # Enable VIA +VIAL_ENABLE = yes # Enable VIAL +OLED_ENABLE = no +OLED_DRIVER = SSD1306 EXTRAKEY_ENABLE = yes LTO_ENABLE = yes QMK_SETTINGS = no COMBO_ENABLE = no +