diff options
Diffstat (limited to 'keyboards/gopolar/gg86')
9 files changed, 17 insertions, 13 deletions
diff --git a/keyboards/gopolar/gg86/config.h b/keyboards/gopolar/gg86/config.h index 7964834623..d1c75d0c79 100644 --- a/keyboards/gopolar/gg86/config.h +++ b/keyboards/gopolar/gg86/config.h @@ -41,7 +41,7 @@ #ifdef RGB_MATRIX_ENABLE /* RGB Matrix config */ #define RGB_DI_PIN E2 - #define DRIVER_LED_TOTAL 100 + #define RGB_MATRIX_LED_COUNT 100 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/gopolar/gg86/keymaps/bongocat/keymap.c b/keyboards/gopolar/gg86/keymaps/bongocat/keymap.c index de1046c5d3..9f23371831 100644 --- a/keyboards/gopolar/gg86/keymaps/bongocat/keymap.c +++ b/keyboards/gopolar/gg86/keymaps/bongocat/keymap.c @@ -181,7 +181,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -206,6 +206,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(73, 0, 0, 0); } } + return false; } #ifdef OLED_ENABLE diff --git a/keyboards/gopolar/gg86/keymaps/default/keymap.c b/keyboards/gopolar/gg86/keymaps/default/keymap.c index 070858c958..3b0a6aa66c 100644 --- a/keyboards/gopolar/gg86/keymaps/default/keymap.c +++ b/keyboards/gopolar/gg86/keymaps/default/keymap.c @@ -230,7 +230,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -255,6 +255,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(73, 0, 0, 0); } } + return false; } #ifdef OLED_ENABLE diff --git a/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h b/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h index ad7a3238ce..9003cd5e6b 100644 --- a/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h +++ b/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h @@ -75,7 +75,7 @@ enum layer_keycodes { G_PRE, //Gradient presets REF_G, //Toggle between linear and reflected gradient G_FLIP, //Flip the gradient colors - + //Custom led effect keycode RGB_C_E, //Cycle user effect }; @@ -118,7 +118,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { {{205, 250, 255}, {140, 215, 125}, false }, }; - uint8_t gp_length = sizeof(gradient_presets)/sizeof(gradient_presets[0]); + uint8_t gp_length = ARRAY_SIZE(gradient_presets); switch (keycode) { case G1_HUI: @@ -276,7 +276,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -301,4 +301,5 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(73, 0, 0, 0); } } + return false; } diff --git a/keyboards/gopolar/gg86/keymaps/horrortroll/led/custom_gradient.c b/keyboards/gopolar/gg86/keymaps/horrortroll/led/custom_gradient.c index fcedf777eb..951884b456 100644 --- a/keyboards/gopolar/gg86/keymaps/horrortroll/led/custom_gradient.c +++ b/keyboards/gopolar/gg86/keymaps/horrortroll/led/custom_gradient.c @@ -70,5 +70,5 @@ static bool CUSTOM_GRADIENT(effect_params_t* params) { rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return led_max < RGB_MATRIX_LED_COUNT; }
\ No newline at end of file diff --git a/keyboards/gopolar/gg86/keymaps/horrortroll/led/rainbow_reactive_simple/rainbow_reactive_simple.h b/keyboards/gopolar/gg86/keymaps/horrortroll/led/rainbow_reactive_simple/rainbow_reactive_simple.h index 5b610716e0..9fff344664 100644 --- a/keyboards/gopolar/gg86/keymaps/horrortroll/led/rainbow_reactive_simple/rainbow_reactive_simple.h +++ b/keyboards/gopolar/gg86/keymaps/horrortroll/led/rainbow_reactive_simple/rainbow_reactive_simple.h @@ -41,5 +41,5 @@ bool effect_rainbow_reactive(effect_params_t* params, rainbow_reactive_f effect_ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return led_max < RGB_MATRIX_LED_COUNT; }
\ No newline at end of file diff --git a/keyboards/gopolar/gg86/keymaps/horrortroll/led/random_breath_rainbow.c b/keyboards/gopolar/gg86/keymaps/horrortroll/led/random_breath_rainbow.c index e5f399cdd3..b5ffef665f 100644 --- a/keyboards/gopolar/gg86/keymaps/horrortroll/led/random_breath_rainbow.c +++ b/keyboards/gopolar/gg86/keymaps/horrortroll/led/random_breath_rainbow.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -static uint8_t offset[DRIVER_LED_TOTAL]; +static uint8_t offset[RGB_MATRIX_LED_COUNT]; static void doRandom_breath_rainbow(int i, effect_params_t* params) { if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; @@ -41,7 +41,7 @@ bool RANDOM_BREATH_RAINBOW(effect_params_t* params) { if (!params->init) { // Change one LED every tick, make sure speed is not 0 - doRandom_breath_rainbow(rand() % DRIVER_LED_TOTAL, params); + doRandom_breath_rainbow(rand() % RGB_MATRIX_LED_COUNT, params); return false; } @@ -51,5 +51,5 @@ bool RANDOM_BREATH_RAINBOW(effect_params_t* params) { doRandom_breath_rainbow(i, params); } - return led_max < DRIVER_LED_TOTAL; + return led_max < RGB_MATRIX_LED_COUNT; }
\ No newline at end of file diff --git a/keyboards/gopolar/gg86/keymaps/via/keymap.c b/keyboards/gopolar/gg86/keymaps/via/keymap.c index 070858c958..3b0a6aa66c 100644 --- a/keyboards/gopolar/gg86/keymaps/via/keymap.c +++ b/keyboards/gopolar/gg86/keymaps/via/keymap.c @@ -230,7 +230,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { HSV hsv = rgb_matrix_config.hsv; uint8_t time = scale16by8(g_rgb_timer, qadd8(32, 1)); hsv.h = time; @@ -255,6 +255,7 @@ void rgb_matrix_indicators_user(void) { rgb_matrix_set_color(73, 0, 0, 0); } } + return false; } #ifdef OLED_ENABLE diff --git a/keyboards/gopolar/gg86/lib/wave.h b/keyboards/gopolar/gg86/lib/wave.h index 11a3198ab1..f4e5e5052c 100644 --- a/keyboards/gopolar/gg86/lib/wave.h +++ b/keyboards/gopolar/gg86/lib/wave.h @@ -69,7 +69,7 @@ void add_keylog(uint16_t keycode) { keycode = 0; } - if (keycode < (sizeof(code_to_name) / sizeof(char))) { + if (keycode < ARRAY_SIZE(code_to_name)) { char log_char = pgm_read_byte(&code_to_name[keycode]); for (uint8_t j = 0; j < OLED_FONT_WIDTH; j++) { |