From d18b0bf3f7af7afc7e1c4aaa797e1d5a7c85b748 Mon Sep 17 00:00:00 2001 From: Brock Szuszczewicz Date: Thu, 27 Apr 2023 15:53:02 -0600 Subject: [PATCH] Load layer state after initializing matrix Delays the call to set the rgb layer state until shortly after matrix_init_kb, this means that the keyboard reads it's rgb state from the values loaded from eeprom, not from the defaults. --- keyboards/system76/launch_1/launch_1.c | 2 ++ keyboards/system76/launch_2/launch_2.c | 2 ++ keyboards/system76/launch_heavy_1/launch_heavy_1.c | 2 ++ keyboards/system76/launch_lite_1/launch_lite_1.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/keyboards/system76/launch_1/launch_1.c b/keyboards/system76/launch_1/launch_1.c index fd780f6fee27..b9f9ff62f8f9 100644 --- a/keyboards/system76/launch_1/launch_1.c +++ b/keyboards/system76/launch_1/launch_1.c @@ -137,7 +137,9 @@ void matrix_init_kb(void) { } else { system76_ec_rgb_eeprom(false); } +} +void keyboard_post_init_user(void) { system76_ec_rgb_layer(layer_state); } diff --git a/keyboards/system76/launch_2/launch_2.c b/keyboards/system76/launch_2/launch_2.c index b348b1cbdbbd..21bcc6045954 100644 --- a/keyboards/system76/launch_2/launch_2.c +++ b/keyboards/system76/launch_2/launch_2.c @@ -139,7 +139,9 @@ void matrix_init_kb(void) { } else { system76_ec_rgb_eeprom(false); } +} +void keyboard_post_init_user(void) { system76_ec_rgb_layer(layer_state); } diff --git a/keyboards/system76/launch_heavy_1/launch_heavy_1.c b/keyboards/system76/launch_heavy_1/launch_heavy_1.c index 320fbdc0df5d..b9c66809a6eb 100644 --- a/keyboards/system76/launch_heavy_1/launch_heavy_1.c +++ b/keyboards/system76/launch_heavy_1/launch_heavy_1.c @@ -152,7 +152,9 @@ void matrix_init_kb(void) { } else { system76_ec_rgb_eeprom(false); } +} +void keyboard_post_init_user(void) { system76_ec_rgb_layer(layer_state); } diff --git a/keyboards/system76/launch_lite_1/launch_lite_1.c b/keyboards/system76/launch_lite_1/launch_lite_1.c index 94c9c92dc2a7..affa283e2044 100644 --- a/keyboards/system76/launch_lite_1/launch_lite_1.c +++ b/keyboards/system76/launch_lite_1/launch_lite_1.c @@ -125,7 +125,9 @@ void matrix_init_kb(void) { } else { system76_ec_rgb_eeprom(false); } +} +void keyboard_post_init_user(void) { system76_ec_rgb_layer(layer_state); }