fix: moonlander/ergodox out of bound animation mode when flashing a layout with less animations set

This commit is contained in:
Florian
2024-07-12 14:22:38 +07:00
parent b36861d7f9
commit e11c9a101c
2 changed files with 8 additions and 0 deletions

View File

@@ -38,6 +38,11 @@ void keyboard_post_init_kb(void) {
keyboard_config.raw = eeconfig_read_kb();
ergodox_led_all_set((uint8_t)keyboard_config.led_level * 255 / 4);
ergodox_blink_all_leds();
# if defined(RGB_MATRIX_ENABLE)
if (rgb_matrix_get_mode() >= RGB_MATRIX_EFFECT_MAX) {
rgb_matrix_mode(RGB_MATRIX_NONE);
}
# endif
keyboard_post_init_user();
}

View File

@@ -396,6 +396,9 @@ void keyboard_post_init_kb(void) {
eeconfig_update_kb(keyboard_config.raw);
}
#ifdef RGB_MATRIX_ENABLE
if (rgb_matrix_get_mode() >= RGB_MATRIX_EFFECT_MAX) {
rgb_matrix_mode(RGB_MATRIX_NONE);
}
rgb_matrix_enable_noeeprom();
#endif
#if defined(DEFERRED_EXEC_ENABLE)