summaryrefslogtreecommitdiff
path: root/keyboards/moonlander/moonlander.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-07-12 16:36:17 -0700
committerGitHub <noreply@github.com>2022-07-13 08:36:17 +0900
commit764ac89d8db728175996ffb1830895d3b9fd83c8 (patch)
treece2e9723be36492896e8407aad742d2e3efe1ed2 /keyboards/moonlander/moonlander.c
parent085f0898e038903a677b4270ec0ba6259f66404f (diff)
Fix issues with RGB Matrix flags (#353)
Diffstat (limited to 'keyboards/moonlander/moonlander.c')
-rw-r--r--keyboards/moonlander/moonlander.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c
index 3c8f5b4184..e849bff4e2 100644
--- a/keyboards/moonlander/moonlander.c
+++ b/keyboards/moonlander/moonlander.c
@@ -407,7 +407,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
keyboard_config.disable_layer_led ^= 1;
if (keyboard_config.disable_layer_led) rgb_matrix_set_color_all(0, 0, 0);
- eeconfig_update_kb(keyboard_config.raw);
}
break;
case RGB_TOG:
@@ -415,15 +414,12 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_NONE);
- keyboard_config.rgb_matrix_enable = false;
rgb_matrix_set_color_all(0, 0, 0);
} break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
- keyboard_config.rgb_matrix_enable = true;
} break;
}
- eeconfig_update_kb(keyboard_config.raw);
}
return false;
#endif
@@ -439,19 +435,11 @@ void matrix_init_kb(void) {
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);
- } else {
- rgb_matrix_set_flags(LED_FLAG_NONE);
- }
-#endif
matrix_init_user();
}
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);