[Keyboard] Update to ZSA Boards (#10119)
* Add VID/PIDs to ErgoDox EZ * Add VID/PIDs for Planck EZ and Glow revision * Make names consistent * fix typo in docs * Move LED config back, for maximum compatibility * Add revisions for ErgoDox EZ boards * Fix embarassing typo * Typooooo Co-authored-by: Nick Brassel <nick@tzarc.org> * Update Licensing info * Update Moonlander default keymap to match Oryx's default * Fix formatting based on suggestions Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * Make indicator LEDs more configurable * Update default keymap * Handle older eeprom settings Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
This commit is contained in:
parent
451e600476
commit
2a65709db6
29 changed files with 301 additions and 96 deletions
|
@ -1,6 +1,6 @@
|
|||
/* Copyright 2020 ZSA Technology Labs, Inc <@zsa>
|
||||
* Copyright 2020 Jack Humbert <jack.humb@gmail.com>
|
||||
* Copyright 2020 Drashna Jael're <drashna@live.com>
|
||||
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -159,10 +159,10 @@ void keyboard_pre_init_kb(void) {
|
|||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
#ifdef ORYX_CONFIGURATOR
|
||||
#if !defined(MOONLANDER_USER_LEDS)
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
state = layer_state_set_user(state);
|
||||
if (is_launching) return state;
|
||||
if (is_launching || !keyboard_config.led_level) return state;
|
||||
|
||||
ML_LED_1(false);
|
||||
ML_LED_2(false);
|
||||
|
@ -415,6 +415,24 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||
if (!record->event.pressed && !webusb_state.pairing) layer_state_set_kb(layer_state);
|
||||
break;
|
||||
#endif
|
||||
#if !defined(MOONLANDER_USER_LEDS)
|
||||
case LED_LEVEL:
|
||||
if (record->event.pressed) {
|
||||
keyboard_config.led_level ^= 1;
|
||||
eeconfig_update_kb(keyboard_config.raw);
|
||||
if (keyboard_config.led_level) {
|
||||
layer_state_set_kb(layer_state);
|
||||
} else {
|
||||
ML_LED_1(false);
|
||||
ML_LED_2(false);
|
||||
ML_LED_3(false);
|
||||
ML_LED_4(false);
|
||||
ML_LED_5(false);
|
||||
ML_LED_6(false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
case TOGGLE_LAYER_COLOR:
|
||||
if (record->event.pressed) {
|
||||
|
@ -449,6 +467,11 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|||
void matrix_init_kb(void) {
|
||||
keyboard_config.raw = eeconfig_read_kb();
|
||||
|
||||
if (!keyboard_config.led_level && !keyboard_config.led_level_res) {
|
||||
keyboard_config.led_level = true;
|
||||
keyboard_config.led_level_res = 0b11;
|
||||
eeconfig_update_kb(keyboard_config.raw);
|
||||
}
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
if (keyboard_config.rgb_matrix_enable) {
|
||||
rgb_matrix_set_flags(LED_FLAG_ALL);
|
||||
|
@ -461,6 +484,8 @@ void matrix_init_kb(void) {
|
|||
void eeconfig_init_kb(void) { // EEPROM is getting reset!
|
||||
keyboard_config.raw = 0;
|
||||
keyboard_config.rgb_matrix_enable = true;
|
||||
keyboard_config.led_level = true;
|
||||
keyboard_config.led_level_res = 0b11;
|
||||
eeconfig_update_kb(keyboard_config.raw);
|
||||
eeconfig_init_user();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue