diff options
Diffstat (limited to 'keyboards/massdrop')
-rw-r--r-- | keyboards/massdrop/alt/alt.h | 2 | ||||
-rw-r--r-- | keyboards/massdrop/alt/config.h | 78 | ||||
-rw-r--r-- | keyboards/massdrop/alt/config_led.h | 37 | ||||
-rw-r--r-- | keyboards/massdrop/alt/keymaps/default_md/keymap.c | 95 | ||||
-rw-r--r-- | keyboards/massdrop/alt/keymaps/mac_md/keymap.c | 87 | ||||
-rw-r--r-- | keyboards/massdrop/alt/keymaps/pregame/config.h | 74 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/config.h | 78 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/config_led.h | 34 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/ctrl.h | 2 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/keymaps/default_md/keymap.c | 99 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/keymaps/endgame/config.h | 74 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c | 87 | ||||
-rw-r--r-- | keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h | 74 |
13 files changed, 628 insertions, 193 deletions
diff --git a/keyboards/massdrop/alt/alt.h b/keyboards/massdrop/alt/alt.h index 0396095450..c3761bee8b 100644 --- a/keyboards/massdrop/alt/alt.h +++ b/keyboards/massdrop/alt/alt.h @@ -7,7 +7,7 @@ #include "i2c_master.h" #include "md_rgb_matrix.h" //For led keycodes #include "usb/udi_cdc.h" -#include "usb/usb2422.h" +#include "usb/usb_hub.h" #define LAYOUT_65_ansi_blocker( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index d28094c492..df3cd891b6 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -43,6 +43,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Temporary solution for matrix delay */ #define IGNORE_ATOMIC_BLOCK +/* Avoid out-of-bounds errors when SmartEEPROM is not enabled */ +#define EEPROM_SIZE 1024 + /* MCU Port name definitions */ #define PA 0 #define PB 1 @@ -50,22 +53,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* This Shift Register expands available hardware output lines to control additional peripherals */ /* It uses four lines from the MCU to provide 16 output lines */ /* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */ -#define SR_EXP_RCLK_PORT PB -#define SR_EXP_RCLK_PIN 14 +#define SR_EXP_RCLK_PIN B14 /* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */ -#define SR_EXP_OE_N_PORT PB -#define SR_EXP_OE_N_PIN 15 +#define SR_EXP_OE_PIN B15 /* SERCOM port to use for Shift Register SPI */ /* DATAOUT and SCLK must be configured to use hardware pins of this port */ -#define SR_EXP_SERCOM SERCOM2 +#define SPI_SERCOM SERCOM2 /* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */ -#define SR_EXP_DATAOUT_PORT PA -#define SR_EXP_DATAOUT_PIN 12 -#define SR_EXP_DATAOUT_MUX 2 +#define SPI_DATAOUT_PIN A12 +#define SPI_DATAOUT_MUX 2 /* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */ -#define SR_EXP_SCLK_PORT PA -#define SR_EXP_SCLK_PIN 13 -#define SR_EXP_SCLK_MUX 2 +#define SPI_SCLK_PIN A13 +#define SPI_SCLK_MUX 2 /* Debug LED (Small LED Located near MCU) */ #define DEBUG_LED_ENABLE 1 @@ -94,6 +93,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEBUG_BOOT_TRACING_PORT PB #define DEBUG_BOOT_TRACING_PIN 23 +/* USB2422 config */ +#define USB2422_ADDRESS 0x58 +#define USB2422_VENDOR_ID 0x04D8 +#define USB2422_PRODUCT_ID 0xEEC5 +#define USB2422_DEVICE_VER 0x0101 +#define USB2422_MANUFACTURER "Massdrop Inc." +#define USB2422_PRODUCT "Massdrop Hub" +#define USB2422_ACTIVE_PIN A18 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -126,5 +134,53 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 15 #define RGB_MATRIX_LED_FLUSH_LIMIT 10 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-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_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# 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 #include "config_led.h" diff --git a/keyboards/massdrop/alt/config_led.h b/keyboards/massdrop/alt/config_led.h index 82117b3327..b600dd23b9 100644 --- a/keyboards/massdrop/alt/config_led.h +++ b/keyboards/massdrop/alt/config_led.h @@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //swr: Matrix wiring SW Red row (1-12) //swg: Matrix wiring SW Green row (1-12) //swb: Matrix wiring SW Blue row (1-12) -//scan: Associated key scancode if any +//scan: Associated key matrix scancode (set 255 if none or 254 for LED to turn off in alternating mode) //Note: Origin 0,0 may be located anywhere as the software will do the final layout #define ISSI3733_LED_MAP { \ { .id = 1, .x = 0, .y = 0, .adr = { .drv = 2, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 0 }, \ @@ -129,46 +129,45 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { .id = 66, .x = 10.5, .y = -3, .adr = { .drv = 1, .cs = 12, .swr = 8, .swg = 7, .swb = 9 }, .scan = 73 }, \ { .id = 67, .x = 11.25, .y = -3, .adr = { .drv = 1, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 74 }, \ { .id = 68, .x = -0.338, .y = -3.338, .adr = { .drv = 2, .cs = 11, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 69, .x = 0.39, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 69, .x = 0.39, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 70, .x = 1.263, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ - { .id = 71, .x = 2.135, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 71, .x = 2.135, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 72, .x = 3.008, .y = -3.443, .adr = { .drv = 2, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 73, .x = 3.88, .y = -3.443, .adr = { .drv = 2, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 73, .x = 3.88, .y = -3.443, .adr = { .drv = 2, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 74, .x = 4.753, .y = -3.443, .adr = { .drv = 2, .cs = 13, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ - { .id = 75, .x = 5.625, .y = -3.443, .adr = { .drv = 2, .cs = 13, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 75, .x = 5.625, .y = -3.443, .adr = { .drv = 2, .cs = 13, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 76, .x = 6.497, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ - { .id = 77, .x = 7.37, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 77, .x = 7.37, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 78, .x = 8.242, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 79, .x = 9.115, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 79, .x = 9.115, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 80, .x = 9.987, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ - { .id = 81, .x = 10.86, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 81, .x = 10.86, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 82, .x = 11.588, .y = -3.338, .adr = { .drv = 1, .cs = 13, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 83, .x = 11.693, .y = -2.623, .adr = { .drv = 1, .cs = 12, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ + { .id = 83, .x = 11.693, .y = -2.623, .adr = { .drv = 1, .cs = 12, .swr = 11, .swg = 10, .swb = 12 }, .scan = 254 }, \ { .id = 84, .x = 11.693, .y = -1.873, .adr = { .drv = 1, .cs = 8, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ { .id = 85, .x = 11.693, .y = -1.123, .adr = { .drv = 1, .cs = 8, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ - { .id = 86, .x = 11.693, .y = -0.373, .adr = { .drv = 1, .cs = 8, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 86, .x = 11.693, .y = -0.373, .adr = { .drv = 1, .cs = 8, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 87, .x = 11.588, .y = 0.338, .adr = { .drv = 1, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ { .id = 88, .x = 9.908, .y = 0.443, .adr = { .drv = 1, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 89, .x = 9.288, .y = 0.443, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 89, .x = 9.288, .y = 0.443, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 90, .x = 8.625, .y = 0.443, .adr = { .drv = 1, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 91, .x = 7.875, .y = 0.443, .adr = { .drv = 1, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 91, .x = 7.875, .y = 0.443, .adr = { .drv = 1, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 92, .x = 7.125, .y = 0.443, .adr = { .drv = 1, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 93, .x = 6.375, .y = 0.443, .adr = { .drv = 1, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 93, .x = 6.375, .y = 0.443, .adr = { .drv = 1, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 94, .x = 5.625, .y = 0.443, .adr = { .drv = 1, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 95, .x = 4.875, .y = 0.443, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 95, .x = 4.875, .y = 0.443, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 96, .x = 4.125, .y = 0.443, .adr = { .drv = 2, .cs = 7, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 97, .x = 3.375, .y = 0.443, .adr = { .drv = 2, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 97, .x = 3.375, .y = 0.443, .adr = { .drv = 2, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 98, .x = 2.625, .y = 0.443, .adr = { .drv = 2, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 99, .x = 1.875, .y = 0.443, .adr = { .drv = 2, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 99, .x = 1.875, .y = 0.443, .adr = { .drv = 2, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 100, .x = 1.125, .y = 0.443, .adr = { .drv = 2, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ { .id = 101, .x = -0.338, .y = 0.338, .adr = { .drv = 2, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 102, .x = -0.443, .y = -0.373, .adr = { .drv = 2, .cs = 1, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 102, .x = -0.443, .y = -0.373, .adr = { .drv = 2, .cs = 1, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 103, .x = -0.443, .y = -1.123, .adr = { .drv = 2, .cs = 1, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ { .id = 104, .x = -0.443, .y = -1.873, .adr = { .drv = 2, .cs = 1, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 105, .x = -0.443, .y = -2.623, .adr = { .drv = 2, .cs = 10, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ + { .id = 105, .x = -0.443, .y = -2.623, .adr = { .drv = 2, .cs = 10, .swr = 11, .swg = 10, .swb = 12 }, .scan = 254 }, \ }; - #define USB_LED_INDICATOR_ENABLE //Comment out to disable indicator functionality #ifdef USB_LED_INDICATOR_ENABLE //Scan codes refer to actual key matrix codes, not KC_* (255 to disable) #define USB_LED_NUM_LOCK_SCANCODE 255 diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c index 810585a3df..fa8b294cd1 100644 --- a/keyboards/massdrop/alt/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c @@ -3,10 +3,15 @@ enum alt_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum alt_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -31,10 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT( KC_GRV, 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_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, DBG_FAC, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = LAYOUT( @@ -53,6 +59,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; + + switch (keycode) { + case L_BRI ... U_T_AGCR: + if (record->event.pressed) { + md_led_changed(); + } + break; + } switch (keycode) { case L_BRI: @@ -69,6 +84,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -128,7 +175,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -136,6 +209,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); diff --git a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c index b3626c1b61..bfcadf8900 100644 --- a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c @@ -3,10 +3,15 @@ enum alt_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum alt_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -31,10 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT( KC_GRV, 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_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, DBG_FAC, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = LAYOUT( @@ -53,6 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; switch (keycode) { case L_BRI: @@ -69,6 +76,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -128,7 +167,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -136,6 +201,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h index 32dee56d30..19fc4fed34 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/config.h +++ b/keyboards/massdrop/alt/keymaps/pregame/config.h @@ -115,42 +115,42 @@ // #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation // This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. -// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -// #define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -// #define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -// #define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -// #define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -// #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -// #define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -// #define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -// #define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +// #undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +// #undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +// #undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +// #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +// #undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +// #undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +// #undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +// #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +// #undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +// #undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +// #undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +// #undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +// #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation // =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation // =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 3dbd9b8877..6c0678c5ed 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -42,6 +42,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Temporary solution for matrix delay */ #define IGNORE_ATOMIC_BLOCK +/* Avoid out-of-bounds errors when SmartEEPROM is not enabled */ +#define EEPROM_SIZE 1024 + /* MCU Port name definitions */ #define PA 0 #define PB 1 @@ -49,22 +52,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* This Shift Register expands available hardware output lines to control additional peripherals */ /* It uses four lines from the MCU to provide 16 output lines */ /* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */ -#define SR_EXP_RCLK_PORT PB -#define SR_EXP_RCLK_PIN 14 +#define SR_EXP_RCLK_PIN B14 /* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */ -#define SR_EXP_OE_N_PORT PB -#define SR_EXP_OE_N_PIN 15 +#define SR_EXP_OE_PIN B15 /* SERCOM port to use for Shift Register SPI */ /* DATAOUT and SCLK must be configured to use hardware pins of this port */ -#define SR_EXP_SERCOM SERCOM2 +#define SPI_SERCOM SERCOM2 /* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */ -#define SR_EXP_DATAOUT_PORT PA -#define SR_EXP_DATAOUT_PIN 12 -#define SR_EXP_DATAOUT_MUX 2 +#define SPI_DATAOUT_PIN A12 +#define SPI_DATAOUT_MUX 2 /* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */ -#define SR_EXP_SCLK_PORT PA -#define SR_EXP_SCLK_PIN 13 -#define SR_EXP_SCLK_MUX 2 +#define SPI_SCLK_PIN A13 +#define SPI_SCLK_MUX 2 /* Debug LED (Small LED Located near MCU) */ #define DEBUG_LED_ENABLE 1 @@ -93,6 +92,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEBUG_BOOT_TRACING_PORT PB #define DEBUG_BOOT_TRACING_PIN 23 +/* USB2422 config */ +#define USB2422_ADDRESS 0x58 +#define USB2422_VENDOR_ID 0x04D8 +#define USB2422_PRODUCT_ID 0xEEC5 +#define USB2422_DEVICE_VER 0x0101 +#define USB2422_MANUFACTURER "Massdrop Inc." +#define USB2422_PRODUCT "Massdrop Hub" +#define USB2422_ACTIVE_PIN A18 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -125,5 +133,53 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 15 #define RGB_MATRIX_LED_FLUSH_LIMIT 10 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-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_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# 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 #include "config_led.h" diff --git a/keyboards/massdrop/ctrl/config_led.h b/keyboards/massdrop/ctrl/config_led.h index 0c91a0c80b..de897ce1bd 100644 --- a/keyboards/massdrop/ctrl/config_led.h +++ b/keyboards/massdrop/ctrl/config_led.h @@ -58,7 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //swr: Matrix wiring SW Red row (1-12) //swg: Matrix wiring SW Green row (1-12) //swb: Matrix wiring SW Blue row (1-12) -//scan: Associated key scancode if any +//scan: Associated key matrix scancode (set 255 if none or 254 for LED to turn off in alternating mode) //Note: Origin 0,0 may be located anywhere as the software will do the final layout #define ISSI3733_LED_MAP { \ { .id = 1, .x = 0, .y = 0, .adr = { .drv = 2, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 0 }, \ @@ -149,37 +149,37 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. { .id = 86, .x = 12.375, .y = -4.125, .adr = { .drv = 1, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 85 }, \ { .id = 87, .x = 13.125, .y = -4.125, .adr = { .drv = 1, .cs = 11, .swr = 5, .swg = 4, .swb = 6 }, .scan = 86 }, \ { .id = 88, .x = 13.433, .y = -4.43, .adr = { .drv = 1, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 89, .x = 12.285, .y = -4.535, .adr = { .drv = 1, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 89, .x = 12.285, .y = -4.535, .adr = { .drv = 1, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 90, .x = 11.14, .y = -4.535, .adr = { .drv = 1, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 91, .x = 9.995, .y = -4.535, .adr = { .drv = 1, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 91, .x = 9.995, .y = -4.535, .adr = { .drv = 1, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 92, .x = 8.85, .y = -4.535, .adr = { .drv = 1, .cs = 15, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 93, .x = 7.705, .y = -4.535, .adr = { .drv = 1, .cs = 16, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 93, .x = 7.705, .y = -4.535, .adr = { .drv = 1, .cs = 16, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 94, .x = 6.56, .y = -4.535, .adr = { .drv = 2, .cs = 9, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 95, .x = 5.415, .y = -4.535, .adr = { .drv = 2, .cs = 10, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 95, .x = 5.415, .y = -4.535, .adr = { .drv = 2, .cs = 10, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 96, .x = 4.27, .y = -4.535, .adr = { .drv = 2, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 97, .x = 3.125, .y = -4.535, .adr = { .drv = 2, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 97, .x = 3.125, .y = -4.535, .adr = { .drv = 2, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 98, .x = 1.98, .y = -4.535, .adr = { .drv = 2, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 99, .x = 0.835, .y = -4.535, .adr = { .drv = 2, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 99, .x = 0.835, .y = -4.535, .adr = { .drv = 2, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 100, .x = -0.307, .y = -4.43, .adr = { .drv = 2, .cs = 15, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 101, .x = -0.41, .y = -3.245, .adr = { .drv = 2, .cs = 15, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ + { .id = 101, .x = -0.41, .y = -3.245, .adr = { .drv = 2, .cs = 15, .swr = 11, .swg = 10, .swb = 12 }, .scan = 254 }, \ { .id = 102, .x = -0.41, .y = -2.06, .adr = { .drv = 2, .cs = 15, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ - { .id = 103, .x = -0.41, .y = -0.875, .adr = { .drv = 2, .cs = 15, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 103, .x = -0.41, .y = -0.875, .adr = { .drv = 2, .cs = 15, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 104, .x = -0.308, .y = 0.31, .adr = { .drv = 2, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 105, .x = 0.835, .y = 0.415, .adr = { .drv = 2, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 105, .x = 0.835, .y = 0.415, .adr = { .drv = 2, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 106, .x = 1.98, .y = 0.415, .adr = { .drv = 2, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 107, .x = 3.125, .y = 0.415, .adr = { .drv = 2, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 107, .x = 3.125, .y = 0.415, .adr = { .drv = 2, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 108, .x = 4.27, .y = 0.415, .adr = { .drv = 2, .cs = 7, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 109, .x = 5.415, .y = 0.415, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 109, .x = 5.415, .y = 0.415, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 110, .x = 6.56, .y = 0.415, .adr = { .drv = 1, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 111, .x = 7.705, .y = 0.415, .adr = { .drv = 1, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 111, .x = 7.705, .y = 0.415, .adr = { .drv = 1, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 112, .x = 8.85, .y = 0.415, .adr = { .drv = 1, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 113, .x = 9.995, .y = 0.415, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 113, .x = 9.995, .y = 0.415, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 114, .x = 11.14, .y = 0.415, .adr = { .drv = 1, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 115, .x = 12.285, .y = 0.415, .adr = { .drv = 1, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 115, .x = 12.285, .y = 0.415, .adr = { .drv = 1, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 116, .x = 13.432, .y = 0.31, .adr = { .drv = 1, .cs = 10, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 117, .x = 13.535, .y = -0.875, .adr = { .drv = 1, .cs = 10, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 117, .x = 13.535, .y = -0.875, .adr = { .drv = 1, .cs = 10, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 118, .x = 13.535, .y = -2.06, .adr = { .drv = 1, .cs = 10, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 119, .x = 13.535, .y = -3.245, .adr = { .drv = 1, .cs = 10, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 119, .x = 13.535, .y = -3.245, .adr = { .drv = 1, .cs = 10, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ }; #define USB_LED_INDICATOR_ENABLE //Comment out to disable indicator functionality diff --git a/keyboards/massdrop/ctrl/ctrl.h b/keyboards/massdrop/ctrl/ctrl.h index 1650beb9a4..a3d66ba775 100644 --- a/keyboards/massdrop/ctrl/ctrl.h +++ b/keyboards/massdrop/ctrl/ctrl.h @@ -7,7 +7,7 @@ #include "i2c_master.h" #include "md_rgb_matrix.h" //For led keycodes #include "usb/udi_cdc.h" -#include "usb/usb2422.h" +#include "usb/usb_hub.h" #define LAYOUT( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c index 1083571ef9..db36131fca 100644 --- a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c @@ -3,10 +3,15 @@ enum ctrl_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum ctrl_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -33,10 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, DBG_FAC, _______, _______, _______, _______, _______, _______, _______ \ ), /* [X] = LAYOUT( @@ -56,6 +62,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; + + switch (keycode) { + case L_BRI ... U_T_AGCR: + if (record->event.pressed) { + md_led_changed(); + } + break; + } switch (keycode) { case L_BRI: @@ -72,6 +87,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -131,7 +178,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -139,6 +212,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); @@ -179,7 +264,7 @@ led_instruction_t led_instructions[] = { //Flags can be found in tmk_core/protocol/arm_atsam/md_rgb_matrix.h (prefixed with LED_FLAG_) //LED IDs can be found in config_led.h in the keyboard's directory //Examples are below - + //All LEDs use the user's selected pattern (this is the factory default) { .flags = LED_FLAG_USE_ROTATE_PATTERN }, @@ -188,7 +273,7 @@ led_instruction_t led_instructions[] = { //Specific LEDs use specified RGB values while all others are off // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, - + //All LEDs use the user's selected pattern //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green //When layer 1 is active, key LEDs use red (id0 32 - 17: 1111 1111 1111 1111 0000 0000 0000 0000 = 0xFFFF0000) (except top row 16 - 1) diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h index ad738347ab..4850d7eed2 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h @@ -75,42 +75,42 @@ // #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation // This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. -// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -// #define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +#undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +#undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +// #undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +// #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation // =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation // =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c index ba02d5e506..4a85b375b3 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c @@ -3,10 +3,15 @@ enum ctrl_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum ctrl_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -33,10 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, DBG_FAC, _______, _______, _______, _______, _______, _______, _______ \ ), /* [X] = LAYOUT( @@ -64,6 +70,7 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; switch (keycode) { case L_BRI: @@ -80,6 +87,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -139,7 +178,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -147,6 +212,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index 89c129c58e..81e7764a9e 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -93,42 +93,42 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation // This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. -// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -#define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +#undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +#undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +// #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +#undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation // =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation // =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out |