Se agrega la configuracion led por matriz.

This commit is contained in:
Alejandro Lembke Barrientos 2022-09-28 19:18:52 -06:00
parent cf77c945ea
commit 07d00723b2
3 changed files with 25 additions and 33 deletions

View File

@ -115,6 +115,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif #endif
// #define LAYER_STATE_16BIT
#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" #define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"

View File

@ -161,9 +161,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//,-----------------------------------------------------. ,-----------------------------------------------------. //,-----------------------------------------------------. ,-----------------------------------------------------.
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUD, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUD, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_MOD, RGB_VAD, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_MOD, RGB_VAD, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_P, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
TT(4), XXXXXXX, KC_SPC, KC_SPC, RGB_TOG, XXXXXXX TT(4), XXXXXXX, KC_SPC, KC_SPC, RGB_TOG, XXXXXXX
//`--------------------------' `--------------------------' //`--------------------------' `--------------------------'
@ -279,32 +279,26 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif // OLED_ENABLE #endif // OLED_ENABLE
// RGB LAYER CONFIGURATION // RGB LAYER CONFIGURATION
// LENGHTH OF LEDS void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
const int firstLedLeft = 1; for (uint8_t i = led_min; i <= led_max; i++) {
const int lastLedLeft = 26; switch(get_highest_layer(layer_state|default_layer_state)) {
const int firstLedRight = 27; case 1:
const int lastLedRight = 53; rgb_matrix_set_color(i, RGB_GREEN);
break;
void rgb_matrix_indicators_user(void) { case 2:
#ifdef RGB_MATRIX_ENABLE rgb_matrix_set_color(i, RGB_RED);
switch (biton32(layer_state)) { break;
case 1: case 3:
rgb_matrix_set_color_all(RGB_AZURE); rgb_matrix_set_color(i, RGB_BLUE);
break; break;
case 2: default:
rgb_matrix_set_color_all(RGB_YELLOW); if (isWindows == false){
break; rgb_matrix_set_color(26, RGB_RED);
//case 3: }
//rgb_matrix_set_color_all(29, 241, 161); if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
//break; rgb_matrix_set_color(53, RGB_RED);
default: }
if (isWindows == false){ break;
rgb_matrix_set_color(lastLedLeft, 255, 166, 1); }
} }
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
rgb_matrix_set_color(lastLedRight, 255, 166, 1);
}
break;
}
#endif
} }

View File

@ -1 +1 @@
2.1.0 3.0.0