summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2020-07-28 08:18:16 -0700
committerDrashna Jael're <drashna@live.com>2020-07-28 08:18:16 -0700
commita2cbd53ac971e92e0bc24a201b6781123ea7986c (patch)
treecec2ef188d1ce5b5b16d98c9fef2040f82aee63e
parent15553646b8f89fdd80b5da0a8a4d19b81cb50f1a (diff)
Fix Moonlander Initialization
Launching!
-rw-r--r--keyboards/moonlander/moonlander.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c
index 28fd8fdd6c..d7eca1d55f 100644
--- a/keyboards/moonlander/moonlander.c
+++ b/keyboards/moonlander/moonlander.c
@@ -387,6 +387,11 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{6,5}, {5,5}, {4,5}, {3,5}, {2,5}, {1,5},{0,5}},
};
// clang-format on
+
+void keyboard_post_init_kb(void) {
+ rgb_matrix_enable_noeeprom();
+ keyboard_post_init_user();
+}
#endif
#if defined(AUDIO_ENABLE) && defined(MUSIC_MAP)
@@ -442,3 +447,22 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
}
return process_record_user(keycode, record);
}
+
+void matrix_init_kb(void) {
+ keyboard_config.raw = eeconfig_read_kb();
+
+#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
+}
+
+void eeconfig_init_kb(void) { // EEPROM is getting reset!
+ keyboard_config.raw = 0;
+ keyboard_config.rgb_matrix_enable = true;
+ eeconfig_update_kb(keyboard_config.raw);
+ eeconfig_init_user();
+}