From fe642a84fcf1a52cc761dca231244b7971742d00 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Tue, 12 Mar 2019 22:25:39 +0800 Subject: Fix speed issues with RGB Matrix in the DZ60RGB (#5380) * Fix speed issues with RGB Matrix in the DZ60RGB * keep boards in sync --- keyboards/dztech/dz40rgb/config.h | 3 +- keyboards/dztech/dz60rgb/config.h | 2 +- keyboards/dztech/dz60rgb/keymaps/default/keymap.c | 166 +++++++++++----------- 3 files changed, 84 insertions(+), 87 deletions(-) (limited to 'keyboards/dztech') diff --git a/keyboards/dztech/dz40rgb/config.h b/keyboards/dztech/dz40rgb/config.h index 2ac7fbdc8..5b9f6dc08 100644 --- a/keyboards/dztech/dz40rgb/config.h +++ b/keyboards/dztech/dz40rgb/config.h @@ -22,7 +22,7 @@ #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended -#define RGB_MATRIX_SKIP_FRAMES 0 +#define RGB_MATRIX_SKIP_FRAMES 10 #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH @@ -31,4 +31,3 @@ #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. #define DRIVER_COUNT 2 - diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h index a1b3a19d9..19f32440e 100644 --- a/keyboards/dztech/dz60rgb/config.h +++ b/keyboards/dztech/dz60rgb/config.h @@ -23,7 +23,7 @@ #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended -#define RGB_MATRIX_SKIP_FRAMES 0 +#define RGB_MATRIX_SKIP_FRAMES 10 #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH diff --git a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c index 2c667ef42..0eff4ca8a 100644 --- a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c @@ -10,7 +10,7 @@ extern bool g_suspend_state; #define _LAYER7 7 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT( /* Base */ - RESET, RGB_MOD, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\ CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\ @@ -60,92 +60,90 @@ void rgb_matrix_indicators_user(void) { if (!g_suspend_state) { switch (biton32(layer_state)) { case _LAYER1: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); + break; case _LAYER2: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); + break; + case _LAYER3: + if ( this_led & (1<