Skip to content

Commit

Permalink
Fix corne oled not working (#111)
Browse files Browse the repository at this point in the history
Co-authored-by: Dane Lipscombe <[email protected]>
  • Loading branch information
dlip and Dane Lipscombe committed Feb 2, 2022
1 parent a510e2b commit 1929773
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
20 changes: 12 additions & 8 deletions keyboards/crkbd/keymaps/vial/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,17 @@ along with this program. If not, see <http:https://www.gnu.org/licenses/>.
// #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"
7 changes: 4 additions & 3 deletions keyboards/crkbd/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};

#ifdef OLED_DRIVER_ENABLE
#ifdef OLED_ENABLE
#include <stdio.h>

oled_rotation_t oled_init_user(oled_rotation_t rotation) {
Expand Down Expand Up @@ -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) {
Expand All @@ -173,4 +174,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
#endif // OLED_DRIVER_ENABLE
#endif // OLED_ENABLE
12 changes: 7 additions & 5 deletions keyboards/crkbd/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1929773

Please sign in to comment.