diff options
Diffstat (limited to 'keyboards/massdrop')
28 files changed, 91 insertions, 82 deletions
diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index 2a3b5b3311..364e8325b1 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" /* USB Device descriptor parameter */ -#define MANUFACTURER "Massdrop Inc." -#define PRODUCT "ALT Keyboard" #define SERIAL_NUM "Unavailable" /* key matrix size */ diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c index 85ae67878b..963282db1e 100644 --- a/keyboards/massdrop/alt/config_led.c +++ b/keyboards/massdrop/alt/config_led.c @@ -50,8 +50,12 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } md_rgb_matrix_indicators_advanced(led_min, led_max); + return true; } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/alt/config_led.h b/keyboards/massdrop/alt/config_led.h index b600dd23b9..770a430d3c 100644 --- a/keyboards/massdrop/alt/config_led.h +++ b/keyboards/massdrop/alt/config_led.h @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //Define number of ISSI3733 drivers being used (1...16) #define ISSI3733_DRIVER_COUNT 2 -#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT +#define RGB_MATRIX_LED_COUNT ISSI3733_LED_COUNT //Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic) #define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE } diff --git a/keyboards/massdrop/alt/info.json b/keyboards/massdrop/alt/info.json index 909ca8904a..6e87648d95 100644 --- a/keyboards/massdrop/alt/info.json +++ b/keyboards/massdrop/alt/info.json @@ -1,5 +1,6 @@ { - "keyboard_name": "ALT", + "keyboard_name": "ALT Keyboard", + "manufacturer": "Massdrop Inc.", "url": "https://www.massdrop.com/buy/massdrop-alt-mechanical-keyboard", "maintainer": "Massdrop", "usb": { diff --git a/keyboards/massdrop/alt/keymaps/jdelkins/keymap.c b/keyboards/massdrop/alt/keymaps/jdelkins/keymap.c index 967c1570d2..6afd882dbe 100644 --- a/keyboards/massdrop/alt/keymaps/jdelkins/keymap.c +++ b/keyboards/massdrop/alt/keymaps/jdelkins/keymap.c @@ -230,7 +230,7 @@ static void set_rgb_layer(int layer) { switch (cur->type) { case type_hsv: - for (uint8_t i = 0; i < DRIVER_LED_TOTAL ; i++) { + for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT ; i++) { if (!(g_led_config.flags[i] & cur->flags)) rgb_matrix_set_color(i, 0, 0, 0); } @@ -247,7 +247,7 @@ static void set_rgb_layer(int layer) { rgb_matrix_mode_noeeprom(rgbs[cur->mode - RGB_MATRIX_EFFECT_MAX].mode); else rgb_matrix_mode_noeeprom(cur->mode); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; i++) { const RGB *m = &cur->rgb[i]; if (!RGB_IS_NULL(*m)) rgb_matrix_set_color(i, m->r, m->g, m->b); diff --git a/keyboards/massdrop/alt/keymaps/jdelkins/rgb_matrix.h b/keyboards/massdrop/alt/keymaps/jdelkins/rgb_matrix.h index ff30cc0e42..146de00447 100644 --- a/keyboards/massdrop/alt/keymaps/jdelkins/rgb_matrix.h +++ b/keyboards/massdrop/alt/keymaps/jdelkins/rgb_matrix.h @@ -63,7 +63,7 @@ struct layer_rgb { uint8_t mode; union { HSV hsv; - RGB rgb[DRIVER_LED_TOTAL]; + RGB rgb[RGB_MATRIX_LED_COUNT]; }; }; diff --git a/keyboards/massdrop/alt/keymaps/jdelkins_ss/keymap.c b/keyboards/massdrop/alt/keymaps/jdelkins_ss/keymap.c index f5a39338b8..8db9222783 100644 --- a/keyboards/massdrop/alt/keymaps/jdelkins_ss/keymap.c +++ b/keyboards/massdrop/alt/keymaps/jdelkins_ss/keymap.c @@ -113,7 +113,7 @@ static void set_rgb_layer(int layer) { switch (cur->type) { case type_hsv: - for (uint8_t i = 0; i < DRIVER_LED_TOTAL ; i++) { + for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT ; i++) { if (!(g_led_config.flags[i] & cur->flags)) rgb_matrix_set_color(i, 0, 0, 0); } @@ -130,7 +130,7 @@ static void set_rgb_layer(int layer) { rgb_matrix_mode_noeeprom(rgbs[cur->mode - RGB_MATRIX_EFFECT_MAX].mode); else rgb_matrix_mode_noeeprom(cur->mode); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; i++) { const RGB *m = &cur->rgb[i]; if (!RGB_IS_NULL(*m)) rgb_matrix_set_color(i, m->r, m->g, m->b); diff --git a/keyboards/massdrop/alt/keymaps/jdelkins_ss/rgb_matrix.h b/keyboards/massdrop/alt/keymaps/jdelkins_ss/rgb_matrix.h index ff30cc0e42..146de00447 100644 --- a/keyboards/massdrop/alt/keymaps/jdelkins_ss/rgb_matrix.h +++ b/keyboards/massdrop/alt/keymaps/jdelkins_ss/rgb_matrix.h @@ -63,7 +63,7 @@ struct layer_rgb { uint8_t mode; union { HSV hsv; - RGB rgb[DRIVER_LED_TOTAL]; + RGB rgb[RGB_MATRIX_LED_COUNT]; }; }; diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h index 936951e34a..2d13d2c5c9 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/config.h +++ b/keyboards/massdrop/alt/keymaps/pregame/config.h @@ -87,9 +87,8 @@ // #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) -// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects // #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// #define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGBLIGHT_ANIMATIONS // Run RGB animations // #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. diff --git a/keyboards/massdrop/alt/keymaps/pregame/keymap.c b/keyboards/massdrop/alt/keymaps/pregame/keymap.c index 6c1d93b030..c91e557b50 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/keymap.c +++ b/keyboards/massdrop/alt/keymaps/pregame/keymap.c @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #undef _______ #define _______ {0, 0, 0} -const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { +const uint8_t PROGMEM ledmap[][RGB_MATRIX_LED_COUNT][3] = { [0] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CHART, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -182,7 +182,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } void set_layer_color(int layer) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { HSV hsv = { .h = pgm_read_byte(&ledmap[layer][i][0]), .s = pgm_read_byte(&ledmap[layer][i][1]), @@ -199,11 +199,12 @@ void set_layer_color(int layer) { } } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (g_suspend_state || disable_layer_color || rgb_matrix_get_flags() == LED_FLAG_NONE || rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { return; } set_layer_color(get_highest_layer(layer_state)); + return false; } diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 8b8625e700..77967e17d3 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" /* USB Device descriptor parameter */ -#define MANUFACTURER "Massdrop Inc." -#define PRODUCT "CTRL Keyboard" #define SERIAL_NUM "Unavailable" /* key matrix size */ diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c index bd708c2cb8..50daa68e75 100644 --- a/keyboards/massdrop/ctrl/config_led.c +++ b/keyboards/massdrop/ctrl/config_led.c @@ -73,8 +73,12 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } md_rgb_matrix_indicators_advanced(led_min, led_max); + return true; } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/ctrl/config_led.h b/keyboards/massdrop/ctrl/config_led.h index de897ce1bd..f582035e9e 100644 --- a/keyboards/massdrop/ctrl/config_led.h +++ b/keyboards/massdrop/ctrl/config_led.h @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //Define number of ISSI3733 drivers being used (1...16) #define ISSI3733_DRIVER_COUNT 2 -#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT +#define RGB_MATRIX_LED_COUNT ISSI3733_LED_COUNT //Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic) #define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE } diff --git a/keyboards/massdrop/ctrl/info.json b/keyboards/massdrop/ctrl/info.json index 7d0810c630..34c60ca088 100644 --- a/keyboards/massdrop/ctrl/info.json +++ b/keyboards/massdrop/ctrl/info.json @@ -1,5 +1,6 @@ { - "keyboard_name": "CTRL", + "keyboard_name": "CTRL Keyboard", + "manufacturer": "Massdrop Inc.", "url": "https://www.massdrop.com/buy/massdrop-ctrl-mechanical-keyboard", "maintainer": "Massdrop", "usb": { diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h index d0bbfd2103..4b702a1110 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h @@ -47,9 +47,8 @@ // #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) -// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects // #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// #define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // #define RGBLIGHT_ANIMATIONS // Run RGB animations // #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c b/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c index ec32b652da..72446506d9 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config_led.c @@ -73,9 +73,10 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_kb(void) +bool rgb_matrix_indicators_kb(void) { md_rgb_matrix_indicators(); + return rgb_matrix_indicators_user(); } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c b/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c index 6451dd495b..846fc7070c 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/endgame/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TD(TD_CTRL_TERM), TD(TD_LGUI_ML), KC_LALT, KC_SPC, KC_RALT, TT(_FL), TD(TD_APP_YL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [_FL] = LAYOUT( - _______, DM_PLY1, DM_PLY2, _______, _______, DM_REC1, DM_REC2, _______, _______, DM_RSTP, _______, KC_WAKE, KC_SLEP, KC_MUTE, TERM_ON, TERM_OFF, + _______, DM_PLY1, DM_PLY2, _______, _______, DM_REC1, DM_REC2, _______, _______, DM_RSTP, _______, KC_WAKE, KC_SLEP, KC_MUTE, _______, _______, _______, _______, TG(_ML), TG(_GL), TG(_VL), TG(_YL), _______, _______, _______, ROUT_FM, ROUT_TG, ROUT_VD, ROUT_VI, _______, KC_MSTP, KC_MPLY, KC_VOLU, RGB_M_P, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO, U_T_AGCR, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, @@ -124,7 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #undef _______ #define _______ {0, 0, 0} -const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { +const uint8_t PROGMEM ledmap[][RGB_MATRIX_LED_COUNT][3] = { [_FL] = { _______, CORAL, CORAL, _______, _______, CORAL, CORAL, _______, _______, CORAL, _______, YELLOW, YELLOW, TEAL, GOLD, GOLD, _______, _______, PINK, PINK, PINK, PINK, _______, _______, _______, GREEN, GREEN, GREEN, GREEN, _______, TEAL, TEAL, TEAL, @@ -354,7 +354,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void set_layer_color(int layer) { if (layer == 0) { return; } - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { HSV hsv = { .h = pgm_read_byte(&ledmap[layer][i][0]), .s = pgm_read_byte(&ledmap[layer][i][1]), @@ -372,13 +372,14 @@ void set_layer_color(int layer) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (disable_layer_color || rgb_matrix_get_flags() == LED_FLAG_NONE || rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { return; } set_layer_color(get_highest_layer(layer_state)); + return false; } /* This is a test function for Raw HID, which is currently not implemented for this keyboard */ diff --git a/keyboards/massdrop/ctrl/keymaps/foxx1337/config.h b/keyboards/massdrop/ctrl/keymaps/foxx1337/config.h index 160ddf6d18..f8e0e9fc7d 100644 --- a/keyboards/massdrop/ctrl/keymaps/foxx1337/config.h +++ b/keyboards/massdrop/ctrl/keymaps/foxx1337/config.h @@ -32,9 +32,8 @@ // #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) -// #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_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// #define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // #define RGBLIGHT_ANIMATIONS // Run RGB animations // #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. diff --git a/keyboards/massdrop/ctrl/keymaps/foxx1337/hid_protocol.h b/keyboards/massdrop/ctrl/keymaps/foxx1337/hid_protocol.h index ff214aaad6..96f90f5e05 100644 --- a/keyboards/massdrop/ctrl/keymaps/foxx1337/hid_protocol.h +++ b/keyboards/massdrop/ctrl/keymaps/foxx1337/hid_protocol.h @@ -75,6 +75,6 @@ extern uint8_t raw_hid_buffer[RAW_EPSIZE]; // Defined in rgb_matrix_user.inc // It's 119 for Massdrop CTRL, 0 - 118. -extern RGB rgb_matrix_led_state[DRIVER_LED_TOTAL]; +extern RGB rgb_matrix_led_state[RGB_MATRIX_LED_COUNT]; void raw_hid_perform_send(void); diff --git a/keyboards/massdrop/ctrl/keymaps/foxx1337/keymap.c b/keyboards/massdrop/ctrl/keymaps/foxx1337/keymap.c index 299251e456..ad265f0ead 100644 --- a/keyboards/massdrop/ctrl/keymaps/foxx1337/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/foxx1337/keymap.c @@ -199,9 +199,9 @@ void raw_hid_led(uint8_t *data) { //rgb_matrix_set_color(data[1], data[2], data[3], data[4]); const uint8_t led = data[1]; - if (led >= DRIVER_LED_TOTAL) { + if (led >= RGB_MATRIX_LED_COUNT) { raw_hid_buffer[1] = CTRL_HID_NOK; - raw_hid_buffer[2] = DRIVER_LED_TOTAL; + raw_hid_buffer[2] = RGB_MATRIX_LED_COUNT; raw_hid_buffer[3] = CTRL_HID_EOM; return; } @@ -219,7 +219,7 @@ void raw_hid_leds(uint8_t *data) { const uint8_t number_leds = data[2]; uint8_t i = 0; - while (i < number_leds && first_led + i < DRIVER_LED_TOTAL && i * 3 + 5 < RAW_EPSIZE) { + while (i < number_leds && first_led + i < RGB_MATRIX_LED_COUNT && i * 3 + 5 < RAW_EPSIZE) { rgb_matrix_led_state[first_led + i].r = data[3 + i * 3 + 0]; rgb_matrix_led_state[first_led + i].g = data[3 + i * 3 + 1]; rgb_matrix_led_state[first_led + i].b = data[3 + i * 3 + 2]; diff --git a/keyboards/massdrop/ctrl/keymaps/foxx1337/rgb_matrix_user.inc b/keyboards/massdrop/ctrl/keymaps/foxx1337/rgb_matrix_user.inc index cca598e3b2..36d09c42e2 100644 --- a/keyboards/massdrop/ctrl/keymaps/foxx1337/rgb_matrix_user.inc +++ b/keyboards/massdrop/ctrl/keymaps/foxx1337/rgb_matrix_user.inc @@ -26,7 +26,7 @@ RGB_MATRIX_EFFECT(hid_effect) // Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block #ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -RGB rgb_matrix_led_state[DRIVER_LED_TOTAL]; +RGB rgb_matrix_led_state[RGB_MATRIX_LED_COUNT]; // e.g: A simple effect, self-contained within a single method static bool hid_effect(effect_params_t* params) { @@ -38,7 +38,7 @@ static bool hid_effect(effect_params_t* params) { rgb_matrix_led_state[i].g, rgb_matrix_led_state[i].b); } - return led_max < DRIVER_LED_TOTAL; + return led_max < RGB_MATRIX_LED_COUNT; } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index 692faa35a2..b8dddc9ec5 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -65,9 +65,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) -// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects // #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// #define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // #define RGBLIGHT_ANIMATIONS // Run RGB animations // #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c index a1c1dec543..732a60a6c5 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config_led.c @@ -91,7 +91,10 @@ led_config_t g_led_config = { { // clang-format on # ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_kb(void) { md_rgb_matrix_indicators(); } +bool rgb_matrix_indicators_kb(void) { + md_rgb_matrix_indicators(); + return rgb_matrix_indicators_user(); +} # endif // USB_LED_INDICATOR_ENABLE -#endif
\ No newline at end of file +#endif diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c index c89607b3f3..0ea23ccb4c 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "keymap.h" // clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_KL] = LAYOUT( + [_KL] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_GRV, 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_INS, KC_HOME, KC_PGUP, 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_BSLS, KC_DEL, KC_END, KC_PGDN, @@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { # undef _______ # define _______ {0,0,0} -const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { +const uint8_t PROGMEM ledmap[][RGB_MATRIX_LED_COUNT][3] = { [_NL] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, GOLD, GOLD, GOLD, GREEN, GREEN, GREEN, _______, _______, _______, _______, @@ -99,7 +99,7 @@ const uint8_t PROGMEM ledmap[][DRIVER_LED_TOTAL][3] = { _______, GOLD, CORAL, _______, _______, _______, _______, RED, {1,0,0}, CYAN, M9B59B5, _______, _______, _______, RED, _______, _______, _______, RED, PINK, YELLOW, GREEN, CREAM, _______, _______, _______, _______, _______, _______, _______, _______, WHITE, _______, _______, CORAL, _______, CORAL - }, + }, }; # undef _______ # define _______ KC_TRNS @@ -217,7 +217,7 @@ void set_layer_color(int layer) { if (layer == 0) { return; } - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) { HSV hsv = { .h = pgm_read_byte(&ledmap[layer][i][0]), .s = pgm_read_byte(&ledmap[layer][i][1]), @@ -278,9 +278,10 @@ void set_layer_color(int layer) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { if (g_suspend_state || disable_layer_color || rgb_matrix_get_flags() == LED_FLAG_NONE || rgb_matrix_get_flags() == LED_FLAG_UNDERGLOW) { return; } set_layer_color(get_highest_layer(layer_state)); + return false; } diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c index ddcf30b68d..eee2eaf628 100644 --- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c @@ -129,8 +129,7 @@ static uint8_t COLOR_PATTERNS[][COLOR_PATTERN_RGB_COUNT][3] = { { 66, 66, 66}, { 45, 45, 45}, { 23, 23, 23}, }, }; -static const uint8_t COLOR_PATTERNS_COUNT = ( - sizeof(COLOR_PATTERNS) / sizeof(COLOR_PATTERNS[0])); +static const uint8_t COLOR_PATTERNS_COUNT = ARRAY_SIZE(COLOR_PATTERNS); /** * trimed down version of `ISSI3733_LED_MAP`: diff --git a/keyboards/massdrop/ctrl/keymaps/xanimos/config.h b/keyboards/massdrop/ctrl/keymaps/xanimos/config.h index f1cbd5f3b0..59feed09a9 100644 --- a/keyboards/massdrop/ctrl/keymaps/xanimos/config.h +++ b/keyboards/massdrop/ctrl/keymaps/xanimos/config.h @@ -63,9 +63,8 @@ // #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) -// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects // #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// #define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // #define RGBLIGHT_ANIMATIONS // Run RGB animations // #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. diff --git a/keyboards/massdrop/ctrl/keymaps/xanimos/config_led.c b/keyboards/massdrop/ctrl/keymaps/xanimos/config_led.c index 650b31477c..d83318de83 100644 --- a/keyboards/massdrop/ctrl/keymaps/xanimos/config_led.c +++ b/keyboards/massdrop/ctrl/keymaps/xanimos/config_led.c @@ -1,18 +1,18 @@ /* Copyright 2022 Daniel Weeks (@xanimos) - * - * 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 - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ + * + * 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 + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ #ifdef RGB_MATRIX_ENABLE #include "ctrl.h" @@ -89,8 +89,9 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { md_rgb_matrix_indicators_advanced(led_min, led_max); |