aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormoyi4681 <moyi4681@users.noreply.github.com>2019-03-12 22:25:39 +0800
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-03-12 07:25:39 -0700
commitfe642a84fcf1a52cc761dca231244b7971742d00 (patch)
tree8f94978d73935ea6d19c50a23f792059da018765
parent395a7793d1c39053e95a699b4c5dc6ae9c304584 (diff)
downloadfirmware-fe642a84fcf1a52cc761dca231244b7971742d00.tar.gz
firmware-fe642a84fcf1a52cc761dca231244b7971742d00.tar.bz2
firmware-fe642a84fcf1a52cc761dca231244b7971742d00.zip
Fix speed issues with RGB Matrix in the DZ60RGB (#5380)
* Fix speed issues with RGB Matrix in the DZ60RGB * keep boards in sync
-rw-r--r--keyboards/dztech/dz40rgb/config.h3
-rw-r--r--keyboards/dztech/dz60rgb/config.h2
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/default/keymap.c166
3 files changed, 84 insertions, 87 deletions
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<<USB_LED_NUM_LOCK)) {
+ rgb_matrix_set_color(13, 0xFF, 0x00, 0x00);
+ } else {
+ rgb_matrix_set_color(13, 0x00, 0x00, 0x00);
+ }
+ rgb_matrix_set_color(0, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(1, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(2, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(3, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(4, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(5, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(6, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(7, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(8, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(9, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(10, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(11, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(12, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(14, 0x00, 0x00, 0xFF);
+ rgb_matrix_set_color(15, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(16, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(17, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(18, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(19, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(20, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(21, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(22, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(23, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(24, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(25, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(26, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(27, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(28, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(29, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(30, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(31, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(32, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(33, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(34, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(35, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(36, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(37, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(38, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(39, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(40, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(41, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(42, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(43, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(44, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(45, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(46, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(47, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(48, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(49, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(50, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(51, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(52, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(53, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(54, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(55, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(56, 0x00, 0x00, 0x00);
+ rgb_matrix_set_color(57, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(58, 0x00, 0xFF, 0x00);
+ rgb_matrix_set_color(59, 0xFF, 0x00, 0x00);
+ rgb_matrix_set_color(60, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(61, 0xFF, 0xFF, 0x00);
+ rgb_matrix_set_color(62, 0x00, 0x00, 0x00);
+ break;
case _LAYER4:
- rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
- }
- }
- if ( this_led & (1<<USB_LED_CAPS_LOCK)) {
- rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
- }
+ rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false);
+ break;
+ }
+ }
+ if ( this_led & (1<<USB_LED_CAPS_LOCK)) {
+ rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
+ }
- switch (biton32(layer_state)) {
- case _LAYER3:
- if ( this_led & (1<<USB_LED_NUM_LOCK))
- {
- rgb_matrix_set_color(13, 0xFF, 0x00, 0x00);
- }
- else
- {
- rgb_matrix_set_color(13, 0x00, 0x00, 0x00);
- }
- rgb_matrix_set_color(0, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(1, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(2, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(3, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(4, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(5, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(6, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(7, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(8, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(9, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(10, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(11, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(12, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(14, 0x00, 0x00, 0xFF);
- rgb_matrix_set_color(15, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(16, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(17, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(18, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(19, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(20, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(21, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(22, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(23, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(24, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(25, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(26, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(27, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(28, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(29, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(30, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(31, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(32, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(33, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(34, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(35, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(36, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(37, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(38, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(39, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(40, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(41, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(42, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(43, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(44, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(45, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(46, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(47, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(48, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(49, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(50, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(51, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(52, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(53, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(54, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(55, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(56, 0x00, 0x00, 0x00);
- rgb_matrix_set_color(57, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(58, 0x00, 0xFF, 0x00);
- rgb_matrix_set_color(59, 0xFF, 0x00, 0x00);
- rgb_matrix_set_color(60, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(61, 0xFF, 0xFF, 0x00);
- rgb_matrix_set_color(62, 0x00, 0x00, 0x00);
- break;
- }
}