From 6773c67c2dd3f87cd88f968083518937a2d0258d Mon Sep 17 00:00:00 2001 From: Sadek Baroudi Date: Mon, 27 Sep 2021 21:24:45 -0700 Subject: [PATCH] updated default keymap, encoders code was broken when RGB light is enabled --- keyboards/xoiviox/barobord/config.h | 5 +++- .../xoiviox/barobord/keymaps/default/keymap.c | 23 ------------------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/keyboards/xoiviox/barobord/config.h b/keyboards/xoiviox/barobord/config.h index dad8596baa..48cfeba0df 100644 --- a/keyboards/xoiviox/barobord/config.h +++ b/keyboards/xoiviox/barobord/config.h @@ -25,7 +25,8 @@ along with this program. If not, see . #define PRODUCT_ID 0x5850 //#define DEVICE_VER 0x0001 // Now defined in the revX/config.h #define MANUFACTURER sadekbaroudi -#define PRODUCT barobord +#define PRODUCT sadekbaroudi barobord +#define DESCRIPTION sadekbaroudi barobord /* key matrix size */ /* Rows are doubled up */ @@ -145,3 +146,5 @@ along with this program. If not, see . // If using encoder type 2, uncomment this // #define ENCODERS_B_REVERSE + +#define DYNAMIC_KEYMAP_LAYER_COUNT 5 \ No newline at end of file diff --git a/keyboards/xoiviox/barobord/keymaps/default/keymap.c b/keyboards/xoiviox/barobord/keymaps/default/keymap.c index df2fab3ed1..cdcd00bc85 100644 --- a/keyboards/xoiviox/barobord/keymaps/default/keymap.c +++ b/keyboards/xoiviox/barobord/keymaps/default/keymap.c @@ -148,22 +148,10 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #else if (clockwise) { #endif - #if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB) - rgblight_increase_hue(); - #else tap_code(KC_VOLU); - #endif } else { - #if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB) - rgblight_decrease_hue(); - #else tap_code(KC_VOLD); - #endif } - - #ifdef RGBLIGHT_ENABLE - rgb_set_user_config_from_current_values(); - #endif } else if (index == 1) { // Conditional to reverse the direction of encoder number 1 @@ -173,22 +161,11 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #else if (clockwise) { #endif - #if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB) - rgblight_step(); - #else tap_code16(C(KC_RGHT)); - #endif } else{ - #if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB) - rgblight_step_reverse(); - #else tap_code16(C(KC_LEFT)); - #endif } - #if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB) - rgb_set_user_config_from_current_values(); - #endif } return true;