From b27ddf1edbc5baa317507d7c91054abd2e14de8a Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sun, 21 Apr 2019 11:13:44 -0500 Subject: [Keyboard] Updated rules.mk for Sol to use the correct feature flag (#5672) --- keyboards/sol/keymaps/default/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/sol/keymaps/default') diff --git a/keyboards/sol/keymaps/default/rules.mk b/keyboards/sol/keymaps/default/rules.mk index 40167b3755..526b72fe7f 100644 --- a/keyboards/sol/keymaps/default/rules.mk +++ b/keyboards/sol/keymaps/default/rules.mk @@ -19,7 +19,7 @@ UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder (+90) -OLED_ENABLE = no # OLED_ENABLE (+5000) +OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) # Do not edit past here -- cgit v1.2.3 From e01b2d518a1a08ce07278ef9a38c7a793c843749 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Mon, 6 May 2019 17:06:43 -0500 Subject: [Keyboard] Sol keyboard conversion to split common (#5773) * Split common conversion * Updated serial and encoder pins * Fixing default folder until r2 * Fixing oled driver on slave split common * Fixing keymap compile errors * Fixing oled inactivity timer on slave split common * Hoisted oled driver task, init, & activity to keyboard.c * Update keyboards/sol/config.h Co-Authored-By: XScorpion2 * Remove TAPPING_FORCE_HOLD --- keyboards/sol/keymaps/default/keymap.c | 28 ++++++++++++++++++++++------ keyboards/sol/keymaps/default/rules.mk | 6 ------ 2 files changed, 22 insertions(+), 12 deletions(-) (limited to 'keyboards/sol/keymaps/default') diff --git a/keyboards/sol/keymaps/default/keymap.c b/keyboards/sol/keymaps/default/keymap.c index a40bc40b73..c101a9bd8e 100644 --- a/keyboards/sol/keymaps/default/keymap.c +++ b/keyboards/sol/keymaps/default/keymap.c @@ -12,8 +12,6 @@ extern keymap_config_t keymap_config; extern rgblight_config_t rgblight_config; #endif -extern uint8_t is_master; - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -70,7 +68,7 @@ LAYOUT( \ FN_CAPS, _10, _11, _12, _13, _14, KC_LPRN, KC_RPRN, _15, _16, _17, _18, _19, KC_QUOT, \ KC_LSFT, _20, _21, _22, _23, _24, KC_LCBR, KC_RCBR, _25, _26, _27, _28, _29, KC_ENT, \ KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, \ - KC_VOLU, KC_VOLD, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_VOLU, KC_VOLD \ + KC_SPC, KC_DEL, KC_ENT, KC_SPC \ ) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -138,7 +136,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ - KC_VOLU, KC_VOLD, _______, _______, _______, _______, KC_VOLU, KC_VOLD \ + _______, _______, _______, _______ \ ), /* ADJ @@ -163,7 +161,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ - KC_VOLU, KC_VOLD, _______, _______, _______, _______, KC_VOLU, KC_VOLD \ + _______, _______, _______, _______ \ ) }; @@ -173,6 +171,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool TOG_STATUS = false; int RGB_current_mode; +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} +#endif + // Setting ADJ layer RGB back to default void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { @@ -316,7 +332,7 @@ static void render_status(void) { } void oled_task_user(void) { - if (is_master) + if (is_keyboard_master()) render_status(); else render_logo(); diff --git a/keyboards/sol/keymaps/default/rules.mk b/keyboards/sol/keymaps/default/rules.mk index 526b72fe7f..09b0e201d5 100644 --- a/keyboards/sol/keymaps/default/rules.mk +++ b/keyboards/sol/keymaps/default/rules.mk @@ -17,18 +17,12 @@ RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing -ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder (+90) OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) # Do not edit past here -ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes) - OPT_DEFS += -DENCODER_ENABLE_CUSTOM - SRC += common/knob_v2.c -endif - ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) OPT_DEFS += -DIOS_DEVICE_ENABLE else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) -- cgit v1.2.3