diff options
Diffstat (limited to 'keyboards/gmmk/pro/rev1/iso')
-rw-r--r-- | keyboards/gmmk/pro/rev1/iso/config.h | 2 | ||||
-rw-r--r-- | keyboards/gmmk/pro/rev1/iso/iso.c | 2 | ||||
-rw-r--r-- | keyboards/gmmk/pro/rev1/iso/keymaps/chofstede/keymap.c | 7 | ||||
-rw-r--r-- | keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c | 21 | ||||
-rw-r--r-- | keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c | 10 | ||||
-rw-r--r-- | keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/config.h | 4 | ||||
-rw-r--r-- | keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/keymap.c | 3 | ||||
-rw-r--r-- | keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/readme.adoc | 4 |
8 files changed, 29 insertions, 24 deletions
diff --git a/keyboards/gmmk/pro/rev1/iso/config.h b/keyboards/gmmk/pro/rev1/iso/config.h index 26626ccfc1..d8074af06c 100644 --- a/keyboards/gmmk/pro/rev1/iso/config.h +++ b/keyboards/gmmk/pro/rev1/iso/config.h @@ -20,4 +20,4 @@ #define DRIVER_1_LED_TOTAL 66 #define DRIVER_2_LED_TOTAL 33 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/gmmk/pro/rev1/iso/iso.c b/keyboards/gmmk/pro/rev1/iso/iso.c index fa57f1ca92..babb6bd6c7 100644 --- a/keyboards/gmmk/pro/rev1/iso/iso.c +++ b/keyboards/gmmk/pro/rev1/iso/iso.c @@ -137,7 +137,7 @@ led_config_t g_led_config = {{ 2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 }}; -const aw_led g_aw_leds[DRIVER_LED_TOTAL] = { +const aw_led g_aw_leds[RGB_MATRIX_LED_COUNT] = { {0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13 {0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16 {0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11 diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/chofstede/keymap.c b/keyboards/gmmk/pro/rev1/iso/keymaps/chofstede/keymap.c index b28809fdf6..971e0821a3 100644 --- a/keyboards/gmmk/pro/rev1/iso/keymaps/chofstede/keymap.c +++ b/keyboards/gmmk/pro/rev1/iso/keymaps/chofstede/keymap.c @@ -71,7 +71,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { static uint32_t cycle_led_timer = 0; static uint8_t current_value = 0; static uint8_t left_side_leds[8] = {68, 71, 74, 77, 81, 84, 88, 92}; @@ -84,7 +84,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } HSV tempHSV = {.h = 0, .s = 255, .v = current_value}; RGB tempRGB = hsv_to_rgb(tempHSV); - for (uint8_t i = 0; i < sizeof(left_side_leds) / sizeof(left_side_leds[0]); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(left_side_leds); i++) { rgb_matrix_set_color(left_side_leds[i], tempRGB.r, tempRGB.g, tempRGB.b); rgb_matrix_set_color(right_side_leds[i], tempRGB.r, tempRGB.g, tempRGB.b); } @@ -95,7 +95,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { case 2: //layer one break; case 1: - for (uint8_t i = 0; i < sizeof(l2_functions) / sizeof(l2_functions[0]); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(l2_functions); i++) { RGB_MATRIX_INDICATOR_SET_COLOR(l2_functions[i], 255, 0, 0); } break; @@ -103,4 +103,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { break; break; } + return false; } diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c b/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c index 30e8fc5f44..0811f1a33a 100644 --- a/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c +++ b/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c @@ -2,7 +2,7 @@ Copyright 2021 Jonavin Eng @Jonavin Copyright 2022 RustyBrakes (ISO conversion) Copyright 2022 gourdo1 <gourdo1@outlook.com> - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or @@ -76,11 +76,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef GAME_ENABLE [_FN1] = LAYOUT( - EE_CLR, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_VOLD, KC_VOLU, KC_PSCR, KC_SLCK, KC_PAUS, KC_SLEP, + EE_CLR, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_VOLD, KC_VOLU, KC_PSCR, KC_SCRL, KC_PAUS, KC_SLEP, PRNCONF, TG_CAPS, TG_PAD, TG_ESC, TG_DEL, TG_TDCAP,TG_ENC, TG_INS,TG_SPCMOD,TG_AUTOCR,TG_ENGCAP,RGB_TOD,RGB_TOI, _______, RGB_TOG, _______, RGB_SAD, RGB_VAI, RGB_SAI, NK_TOGG, _______, YAHOO, _______, _______, OUTLOOK, TG(_GAME),SWAP_L, SWAP_R, KC_HOME, KC_CAPS, RGB_HUD, RGB_VAD, RGB_HUI, _______, GMAIL, HOTMAIL, _______, _______, LOCKPC, _______, _______, _______, _______, KC_END, - _______, QK_BOOT, RGB_NITE,_______, _______, _______, QK_BOOT, KC_NLCK, _______, _______, DOTCOM, KC_CAD, _______, RGB_MOD, _______, + _______, QK_BOOT, RGB_NITE,_______, _______, _______, QK_BOOT, KC_NUM, _______, _______, DOTCOM, KC_CAD, _______, RGB_MOD, _______, _______, WINLOCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI ), @@ -95,11 +95,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #else [_FN1] = LAYOUT( - EE_CLR, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_VOLD, KC_VOLU, KC_PSCR, KC_SLCK, KC_PAUS, KC_SLEP, + EE_CLR, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_VOLD, KC_VOLU, KC_PSCR, KC_SCRL, KC_PAUS, KC_SLEP, PRNCONF, TG_CAPS, TG_PAD, TG_ESC, TG_DEL, TG_TDCAP,TG_ENC, TG_INS,TG_SPCMOD,TG_AUTOCR,TG_ENGCAP,RGB_TOD,RGB_TOI, _______, RGB_TOG, _______, RGB_SAD, RGB_VAI, RGB_SAI, NK_TOGG, _______, YAHOO, _______, _______, OUTLOOK, KC_PAUS, SWAP_L, SWAP_R, KC_HOME, KC_CAPS, RGB_HUD, RGB_VAD, RGB_HUI, _______, GMAIL, HOTMAIL, _______, _______, LOCKPC, _______, _______, _______, _______, KC_END, - _______, QK_BOOT, RGB_NITE,_______, _______, _______, QK_BOOT, KC_NLCK, _______, _______, DOTCOM, KC_CAD, _______, RGB_MOD, _______, + _______, QK_BOOT, RGB_NITE,_______, _______, _______, QK_BOOT, KC_NUM, _______, _______, DOTCOM, KC_CAD, _______, RGB_MOD, _______, _______, WINLOCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI ), #endif //GAME_ENABLE @@ -243,7 +243,7 @@ void hurt_paddle(void) { #endif //GAME_ENABLE // Capslock, Scroll lock and Numlock indicator on Left side lights. -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF); // Scroll Lock RGB setup @@ -367,7 +367,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif // GAME_ENABLE // System NumLock warning indicator RGB setup - #ifdef INVERT_NUMLOCK_INDICATOR + #ifdef INVERT_NUMLOCK_INDICATOR if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled rgb_matrix_set_color(LED_N, RGB_ORANGE2); } @@ -444,7 +444,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { // Numpad & Mouse Keys overlay RGB case _NUMPADMOUSE: - #ifdef INVERT_NUMLOCK_INDICATOR + #ifdef INVERT_NUMLOCK_INDICATOR if (!IS_HOST_LED_ON(USB_LED_NUM_LOCK)) { // on if NUM lock is OFF to bring attention to overlay numpad not functional when enabled rgb_matrix_set_color(LED_N, RGB_ORANGE2); } @@ -551,7 +551,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } else if (paddle_lives == 0) { // Game over - for (uint8_t i = 0; i < sizeof(LED_GAME_OVER) / sizeof(LED_GAME_OVER[0]); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(LED_GAME_OVER); i++) { rgb_matrix_set_color(LED_GAME_OVER[i], RGB_RED); } @@ -712,6 +712,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif //GAME_ENABLE break; } + return false; } #endif @@ -720,4 +721,4 @@ void keyboard_post_init_keymap(void) { #ifdef RGB_MATRIX_ENABLE activate_rgb_nightmode(false); // Set to true if you want to startup in nightmode, otherwise use Fn + Z to toggle #endif -}
\ No newline at end of file +} diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c b/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c index e4b5711e8b..068ded84fb 100644 --- a/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c +++ b/keyboards/gmmk/pro/rev1/iso/keymaps/jonavin/keymap.c @@ -41,9 +41,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FN1] = LAYOUT( _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, - _______, _______, RGB_VAI, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, KC_HOME, + _______, _______, RGB_VAI, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______, _______, KC_HOME, KC_CAPS, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, - _______, QK_BOOT, RGB_NITE,RGB_HUI, _______, _______, _______, KC_NLCK, _______, RGB_TOD, RGB_TOI, _______, _______, RGB_MOD, _______, + _______, QK_BOOT, RGB_NITE,RGB_HUI, _______, _______, _______, KC_NUM, _______, RGB_TOD, RGB_TOI, _______, _______, RGB_MOD, _______, _______, KC_WINLCK, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI ), @@ -102,13 +102,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { break; } } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } #endif // ENCODER_ENABLE && !ENCODER_DEFAULTACTIONS_ENABLE #ifdef RGB_MATRIX_ENABLE // Capslock, Scroll lock and Numlock indicator on Left side lights. - void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF); if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) { rgb_matrix_set_color(LED_L1, RGB_GREEN); @@ -177,6 +178,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { default: break; } + return false; } #endif diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/config.h b/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/config.h index fd8f1d6859..105efad960 100644 --- a/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/config.h +++ b/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/config.h @@ -6,9 +6,9 @@ #if defined(RGB_MATRIX_ENABLE) #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR // number of milliseconds to wait until turning off RGB automatically - #define RGB_DISABLE_TIMEOUT 300000 // 300 seconds / 5 min + #define RGB_MATRIX_TIMEOUT 300000 // 300 seconds / 5 min // start fading out before getting disabled - // fading out is timed (depending on the rgb_matrix_config.speed) to have finished before reaching RGB_DISABLE_TIMEOUT + // fading out is timed (depending on the rgb_matrix_config.speed) to have finished before reaching RGB_MATRIX_TIMEOUT #define RGB_DISABLE_WITH_FADE_OUT #define RGB_DISABLE_WHEN_USB_SUSPENDED // number of milliseconds to wait until activating RGB idle effects diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/keymap.c b/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/keymap.c index 1e32e7e9c0..2c8a67ef9b 100644 --- a/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/keymap.c +++ b/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/keymap.c @@ -84,7 +84,8 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } break; } - return true; + //return true; //set to return false to counteract enabled encoder in pro.c + return false; } #endif // ENCODER_ENABLE diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/readme.adoc b/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/readme.adoc index 38a74a568b..c34887ebd2 100644 --- a/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/readme.adoc +++ b/keyboards/gmmk/pro/rev1/iso/keymaps/vitoni/readme.adoc @@ -63,11 +63,11 @@ The code customizing RGB light usage is decribed here: * link:../../../../../../users/vitoni/readme.adoc[/users/vitoni/readme.adoc] -When using `RGB_DISABLE_TIMEOUT` addtional options are available: +When using `RGB_MATRIX_TIMEOUT` addtional options are available: * `RGB_FADE_IN` makes the RGB lights fade in instead of setting the value/brightness to 100% (implicitly due to HSV including the brightness) when resuming after RGB lights have been turned off. Fade in occurs when the keyboard is initialized and when the RGB brightness has been changed (e.g. suspending, fade out, etc.). -* `RGB_DISABLE_WITH_FADE_OUT` activates fade out before the keyboard is disabled by `RGB_DISABLE_TIMEOUT`. +* `RGB_DISABLE_WITH_FADE_OUT` activates fade out before the keyboard is disabled by `RGB_MATRIX_TIMEOUT`. Parameters used to define the behavior are: [%header] |