Skip EEPROM writes once done. (#13293)

This commit is contained in:
Nick Brassel 2021-06-22 09:37:28 +10:00 committed by GitHub
parent a89eaceb59
commit 0e3ae2cde0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -286,6 +286,7 @@ static void led_task_timers(void) {
static void led_task_sync(void) { static void led_task_sync(void) {
// next task // next task
if (led_update_eeprom) eeconfig_update_led_matrix(); if (led_update_eeprom) eeconfig_update_led_matrix();
led_update_eeprom = false;
if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING; if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING;
} }

View File

@ -321,6 +321,7 @@ static void rgb_task_timers(void) {
static void rgb_task_sync(void) { static void rgb_task_sync(void) {
// next task // next task
if (rgb_update_eeprom) eeconfig_update_rgb_matrix(); if (rgb_update_eeprom) eeconfig_update_rgb_matrix();
rgb_update_eeprom = false;
if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING; if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING;
} }