Skip to content

Commit

Permalink
Load layer state after initializing matrix
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
13r0ck committed Apr 27, 2023
1 parent 69f2616 commit d18b0bf
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions keyboards/system76/launch_1/launch_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 2 additions & 0 deletions keyboards/system76/launch_2/launch_2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 2 additions & 0 deletions keyboards/system76/launch_heavy_1/launch_heavy_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 2 additions & 0 deletions keyboards/system76/launch_lite_1/launch_lite_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit d18b0bf

Please sign in to comment.