aboutsummaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorJoel Challis <[email protected]>2024-11-23 17:43:45 +0000
committerGitHub <[email protected]>2024-11-23 17:43:45 +0000
commit859dab864a0738f577d1da8e7189748ed8109c44 (patch)
tree5035a98866f5a4ed68005273c33ddc4b47d3b51e /keyboards
parent1f7d10902a7e603a47b9291664fcb9ab0b21f690 (diff)
downloadqmk_firmware-859dab864a0738f577d1da8e7189748ed8109c44.tar.gz
qmk_firmware-859dab864a0738f577d1da8e7189748ed8109c44.zip
Remove keyboard use of eeconfig_read_default_layer (#24635)
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/satt/comet46/keymaps/default-rgbled/keymap.c21
-rw-r--r--keyboards/satt/comet46/keymaps/default/keymap.c24
2 files changed, 16 insertions, 29 deletions
diff --git a/keyboards/satt/comet46/keymaps/default-rgbled/keymap.c b/keyboards/satt/comet46/keymaps/default-rgbled/keymap.c
index 704eb2dd70..773857db1d 100644
--- a/keyboards/satt/comet46/keymaps/default-rgbled/keymap.c
+++ b/keyboards/satt/comet46/keymaps/default-rgbled/keymap.c
@@ -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,18 +182,14 @@ void matrix_scan_user(void) {
case _ADJUST:
set_led_magenta;
break;
+ case _COLEMAK:
+ set_led_white;
+ break;
+ case _DVORAK:
+ set_led_yellow;
+ break;
default:
- switch (default_layer) {
- case _COLEMAK:
- set_led_white;
- break;
- case _DVORAK:
- set_led_yellow;
- break;
- default:
- set_led_green;
- break;
- }
+ set_led_green;
break;
}
};
diff --git a/keyboards/satt/comet46/keymaps/default/keymap.c b/keyboards/satt/comet46/keymaps/default/keymap.c
index c8c58951c8..5d9f1faed7 100644
--- a/keyboards/satt/comet46/keymaps/default/keymap.c
+++ b/keyboards/satt/comet46/keymaps/default/keymap.c
@@ -153,24 +153,16 @@ 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;
- case _COLEMAK:
- snprintf(layer_str, sizeof(layer_str), "Colemak");
- break;
- case _DVORAK:
- snprintf(layer_str, sizeof(layer_str), "Dvorak");
- break;
- default:
- snprintf(layer_str, sizeof(layer_str), "Undef-%d", default_layer);
- break;
- }
+ snprintf(layer_str, sizeof(layer_str), "Qwerty");
+ break;
+ case _COLEMAK:
+ snprintf(layer_str, sizeof(layer_str), "Colemak");
+ break;
+ case _DVORAK:
+ snprintf(layer_str, sizeof(layer_str), "Dvorak");
break;
case _RAISE:
snprintf(layer_str, sizeof(layer_str), "Raise");