Remove keyboard use of eeconfig_read_default_layer (#24635)
This commit is contained in:
parent
1f7d10902a
commit
859dab864a
@ -171,8 +171,7 @@ void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
uint8_t default_layer = biton32(eeconfig_read_default_layer());
|
||||
uint8_t layer = get_highest_layer(layer_state | default_layer_state);
|
||||
switch (layer) {
|
||||
case _LOWER:
|
||||
set_led_red;
|
||||
@ -183,8 +182,6 @@ void matrix_scan_user(void) {
|
||||
case _ADJUST:
|
||||
set_led_magenta;
|
||||
break;
|
||||
default:
|
||||
switch (default_layer) {
|
||||
case _COLEMAK:
|
||||
set_led_white;
|
||||
break;
|
||||
@ -195,6 +192,4 @@ void matrix_scan_user(void) {
|
||||
set_led_green;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
@ -153,11 +153,8 @@ bool oled_task_user(void) {
|
||||
// Layer state
|
||||
char layer_str[22];
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
uint8_t default_layer = get_highest_layer(eeconfig_read_default_layer());
|
||||
uint8_t layer = get_highest_layer(layer_state | default_layer_state);
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
switch (default_layer) {
|
||||
case _QWERTY:
|
||||
snprintf(layer_str, sizeof(layer_str), "Qwerty");
|
||||
break;
|
||||
@ -167,11 +164,6 @@ bool oled_task_user(void) {
|
||||
case _DVORAK:
|
||||
snprintf(layer_str, sizeof(layer_str), "Dvorak");
|
||||
break;
|
||||
default:
|
||||
snprintf(layer_str, sizeof(layer_str), "Undef-%d", default_layer);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case _RAISE:
|
||||
snprintf(layer_str, sizeof(layer_str), "Raise");
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user