Remove redundant RGB/LED matrix eeconfig init (#22673)

This commit is contained in:
Joel Challis 2023-12-16 15:43:39 +00:00 committed by GitHub
parent 7298551e19
commit dc5befd139
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 12 deletions

View file

@ -111,6 +111,16 @@ void eeconfig_debug_led_matrix(void) {
dprintf("led_matrix_eeconfig.flags = %d\n", led_matrix_eeconfig.flags);
}
void led_matrix_reload_from_eeprom(void) {
led_matrix_disable_noeeprom();
/* Reset back to what we have in eeprom */
eeconfig_init_led_matrix();
eeconfig_debug_led_matrix(); // display current eeprom values
if (led_matrix_eeconfig.enable) {
led_matrix_mode_noeeprom(led_matrix_eeconfig.mode);
}
}
__attribute__((weak)) uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
return 0;
}
@ -415,12 +425,6 @@ void led_matrix_init(void) {
}
#endif // LED_MATRIX_KEYREACTIVE_ENABLED
if (!eeconfig_is_enabled()) {
dprintf("led_matrix_init_drivers eeconfig is not enabled.\n");
eeconfig_init();
eeconfig_update_led_matrix_default();
}
eeconfig_init_led_matrix();
if (!led_matrix_eeconfig.mode) {
dprintf("led_matrix_init_drivers led_matrix_eeconfig.mode = 0. Write default values to EEPROM.\n");

View file

@ -136,6 +136,8 @@ bool led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max);
void led_matrix_init(void);
void led_matrix_reload_from_eeprom(void);
void led_matrix_set_suspend_state(bool state);
bool led_matrix_get_suspend_state(void);
void led_matrix_toggle(void);

View file

@ -460,12 +460,6 @@ void rgb_matrix_init(void) {
}
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
if (!eeconfig_is_enabled()) {
dprintf("rgb_matrix_init_drivers eeconfig is not enabled.\n");
eeconfig_init();
eeconfig_update_rgb_matrix_default();
}
eeconfig_init_rgb_matrix();
if (!rgb_matrix_config.mode) {
dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n");