Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align SENSE75 with recent Drop additions #21757

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions keyboards/drop/lib/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#ifdef RGB_MATRIX_ENABLE
# include "host.h"
# include "quantum.h"
# include "rgb_matrix.h"

# define LED_FLAG_ANY_SWITCH (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR)
Expand Down
65 changes: 11 additions & 54 deletions keyboards/drop/sense75/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,15 @@
#define EXTERNAL_EEPROM_WP_PIN B7
#define EEPROM_I2C_24LC256

#ifdef RGB_MATRIX_ENABLE
# define DRIVER_ADDR_1 0b1010000
# define DRIVER_ADDR_2 0b1011111
# define DRIVER_COUNT 2
# define RGB_MATRIX_LED_COUNT (58 + 53)
# define ISSI_PWM_FREQUENCY 0b010 // 26k
#define DRIVER_ADDR_1 0b1010000
#define DRIVER_ADDR_2 0b1011111
#define DRIVER_COUNT 2
#define RGB_MATRIX_LED_COUNT 111
#define ISSI_PWM_FREQUENCY 0b010 // 26k

# define RGB_DISABLE_WHEN_USB_SUSPENDED
# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
# define RGB_MATRIX_KEYPRESSES
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define ENABLE_RGB_MATRIX_ALPHAS_MODS
# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
# define ENABLE_RGB_MATRIX_BREATHING
# define ENABLE_RGB_MATRIX_BAND_SAT
# define ENABLE_RGB_MATRIX_BAND_VAL
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
# define ENABLE_RGB_MATRIX_CYCLE_ALL
# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
# define ENABLE_RGB_MATRIX_DUAL_BEACON
# define ENABLE_RGB_MATRIX_RAINBOW_BEACON
# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
# define ENABLE_RGB_MATRIX_RAINDROPS
# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
# define ENABLE_RGB_MATRIX_HUE_BREATHING
# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
# define ENABLE_RGB_MATRIX_PIXEL_FLOW
# define ENABLE_RGB_MATRIX_PIXEL_RAIN
# define ENABLE_RGB_MATRIX_HUE_PENDULUM
# define ENABLE_RGB_MATRIX_HUE_WAVE
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
# define ENABLE_RGB_MATRIX_SPLASH
# define ENABLE_RGB_MATRIX_MULTISPLASH
# define ENABLE_RGB_MATRIX_SOLID_SPLASH
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS

#define RGB_MATRIX_CYCLE_ZONES_ENABLE
#define RGB_MATRIX_CAPS_LOCK_INDEX 62
48 changes: 48 additions & 0 deletions keyboards/drop/sense75/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"pid": "0x0001",
"device_version": "1.0.0"
},
"eeprom": {
"driver": "i2c"
},
"features": {
"rgb_matrix": true,
"encoder": true,
Expand Down Expand Up @@ -114,6 +117,51 @@
},
"rgb_matrix": {
"driver": "IS31FL3733",
"animations": {
"alphas_mods": true,
"gradient_up_down": true,
"gradient_left_right": true,
"breathing": true,
"band_sat": true,
"band_val": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"rainbow_moving_chevron": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"rainbow_pinwheels": true,
"raindrops": true,
"jellybean_raindrops": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"pixel_fractal": true,
"pixel_flow": true,
"pixel_rain": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"solid_reactive": true,
"solid_reactive_wide": true,
"solid_reactive_multiwide": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_nexus": true,
"solid_reactive_multinexus": true,
"splash": true,
"multisplash": true,
"solid_splash": true,
"solid_multisplash": true
},
"layout": [
{"flags": 2, "x": 2, "y": 0},
{"flags": 2, "x": 22, "y": 0},
Expand Down
9 changes: 1 addition & 8 deletions keyboards/drop/sense75/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, RGB_TOG, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME,
_______, RGB_MOD, RGB_VAD, RGB_SPD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_END,
_______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,_______, NK_TOGG, _______, _______, _______, _______, _______, _______,
_______, _______, _______, EE_CLR, _______, _______, _______, _______, _______, _______
_______, _______, _______, EE_CLR, KC_APP, _______, _______, _______, _______, _______
)
};

Expand All @@ -44,10 +44,3 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[1] = { ENCODER_CCW_CW(KC_MPRV, KC_MNXT) }
};
#endif

bool rgb_matrix_indicators_user(void) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(62, RGB_WHITE);
}
return false;
}
18 changes: 1 addition & 17 deletions keyboards/drop/sense75/keymaps/default_md/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, RGB_TOG, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME,
_______, RGB_MOD, RGB_VAD, RGB_SPD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_END,
_______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,_______, NK_TOGG, _______, _______, _______, _______, _______, _______,
MO(2), _______, _______, EE_CLR, _______, _______, _______, _______, _______, _______
MO(2), _______, _______, EE_CLR, KC_APP, _______, _______, _______, _______, _______
),
[2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand Down Expand Up @@ -86,22 +86,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
rgb_matrix_sethsv_noeeprom(HSV_WHITE);
test_mode = true;
break;
case RGB_TOG:
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL:
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
break;
case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR):
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
break;
case LED_FLAG_UNDERGLOW:
rgb_matrix_set_flags(LED_FLAG_NONE);
break;
default:
rgb_matrix_set_flags(LED_FLAG_ALL);
break;
}
return false;
}
}
return true;
Expand Down
26 changes: 1 addition & 25 deletions keyboards/drop/sense75/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, RGB_TOG, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME,
_______, RGB_MOD, RGB_VAD, RGB_SPD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_END,
_______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,_______, NK_TOGG, _______, _______, _______, _______, _______, _______,
MO(2), _______, _______, EE_CLR, _______, _______, _______, _______, _______, _______
MO(2), _______, _______, EE_CLR, KC_APP, _______, _______, _______, _______, _______
),
[2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
Expand All @@ -53,27 +53,3 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[2] = { ENCODER_CCW_CW(_______, _______) }
};
#endif

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) {
switch (keycode) {
case RGB_TOG:
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL:
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR);
break;
case (LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER | LED_FLAG_INDICATOR):
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
break;
case LED_FLAG_UNDERGLOW:
rgb_matrix_set_flags(LED_FLAG_NONE);
break;
default:
rgb_matrix_set_flags(LED_FLAG_ALL);
break;
}
return false;
}
}
return true;
};
2 changes: 1 addition & 1 deletion keyboards/drop/sense75/rules.mk
Original file line number Diff line number Diff line change
@@ -1 +1 @@
EEPROM_DRIVER = i2c
SRC += lib/common.c
4 changes: 2 additions & 2 deletions keyboards/drop/sense75/sense75.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2022 Massdrop, Inc.
// SPDX-License-Identifier: GPL-2.0-or-later
#include "rgb_matrix.h"

#ifdef RGB_MATRIX_ENABLE
# include "rgb_matrix.h"

const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
// top underglow sd2-sd17
{ 0, B_2, A_2, C_2 },
Expand Down