mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-05-10 17:44:18 -04:00
bandominedoni, Drashna's method is applied to encoder_update_kb. (#15287)
* Drashna's method is applied to rotary encoder rotation detection. rgb_matrix_user.inc -> rgb_matrix_kb.inc. * Disabled some RGB MATRIX effects to shrink the firmware size. * via # of layers changed from 5 to 4.
This commit is contained in:
parent
66522b27bf
commit
979fec9324
3 changed files with 22 additions and 15 deletions
|
@ -15,4 +15,4 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 5
|
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||||
|
|
|
@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
|
|
||||||
_______, MI_OCTD, MI_OCTU, MI_VELD, MI_VELU, _______,
|
_______, MI_OCTD, MI_OCTU, MI_VELD, MI_VELU, _______,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_MOD,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
RGB_SAD, RGB_SAI, RGB_HUD, RGB_HUI, RGB_SPD, RGB_SPI, RGB_VAD, RGB_VAI,
|
RGB_SAD, RGB_SAI, RGB_HUD, RGB_HUI, RGB_SPD, RGB_SPI, RGB_VAD, RGB_VAI,
|
||||||
|
@ -90,23 +90,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void my_init(void){
|
||||||
|
// Set octave to MI_OCT_0
|
||||||
|
midi_config.octave = MI_OCT_0 - MIDI_OCTAVE_MIN;
|
||||||
|
|
||||||
|
// avoid using 127 since it is used as a special number in some sound sources.
|
||||||
|
midi_config.velocity = MIDI_INITIAL_VELOCITY;
|
||||||
|
}
|
||||||
|
|
||||||
void eeconfig_init_user(void) { // EEPROM is getting reset!
|
void eeconfig_init_user(void) { // EEPROM is getting reset!
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
midi_init();
|
||||||
|
my_init();
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_matrix_enable();
|
rgb_matrix_enable();
|
||||||
rgb_matrix_set_speed(RGB_MATRIX_STARTUP_SPD);
|
rgb_matrix_set_speed(RGB_MATRIX_STARTUP_SPD);
|
||||||
rgb_matrix_sethsv(HSV_BLUE);
|
rgb_matrix_sethsv(HSV_BLUE);
|
||||||
|
|
||||||
rgb_matrix_mode(RGB_MATRIX_SOLID_REACTIVE);
|
rgb_matrix_mode(RGB_MATRIX_SOLID_REACTIVE);
|
||||||
// rgb_matrix_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON);
|
// rgb_matrix_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_user(void) {
|
||||||
// Set octave to MI_OCT_0
|
my_init();
|
||||||
midi_config.octave = MI_OCT_0 - MIDI_OCTAVE_MIN;
|
|
||||||
|
|
||||||
// avoid using 127 since it is used as a special number in some sound sources.
|
|
||||||
midi_config.velocity = MIDI_INITIAL_VELOCITY;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
RGB_MATRIX_ENABLE = yes # Use RGB matrix (Don't enable this when RGBLIGHT_ENABLE is used.)
|
RGB_MATRIX_ENABLE = yes # Use RGB matrix (Don't enable this when RGBLIGHT_ENABLE is used.)
|
||||||
|
RGB_MATRIX_CUSTOM_KB = yes #
|
||||||
VIA_ENABLE = yes
|
VIA_ENABLE = yes
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue