From d291d208bfc428e5255b783eaeff77ff22d29c63 Mon Sep 17 00:00:00 2001 From: ReFil <31960031+ReFil@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:32:43 +0000 Subject: [PATCH] Fix loading from flash --- app/src/rgb_underglow.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/src/rgb_underglow.c b/app/src/rgb_underglow.c index a2947e20e85..92dc665eb88 100644 --- a/app/src/rgb_underglow.c +++ b/app/src/rgb_underglow.c @@ -605,18 +605,6 @@ static int zmk_rgb_underglow_init(const struct device *_arg) { } #endif - state = (struct rgb_underglow_state){ - color : { - h : CONFIG_ZMK_RGB_UNDERGLOW_HUE_START, - s : CONFIG_ZMK_RGB_UNDERGLOW_SAT_START, - b : CONFIG_ZMK_RGB_UNDERGLOW_BRT_START, - }, - animation_speed : CONFIG_ZMK_RGB_UNDERGLOW_SPD_START, - current_effect : CONFIG_ZMK_RGB_UNDERGLOW_EFF_START, - animation_step : 0, - on : IS_ENABLED(CONFIG_ZMK_RGB_UNDERGLOW_ON_START) - }; - #if IS_ENABLED(CONFIG_SETTINGS) settings_subsys_init(); @@ -631,6 +619,18 @@ static int zmk_rgb_underglow_init(const struct device *_arg) { settings_load_subtree("rgb/underglow"); #endif + state = (struct rgb_underglow_state){ + color : { + h : CONFIG_ZMK_RGB_UNDERGLOW_HUE_START, + s : CONFIG_ZMK_RGB_UNDERGLOW_SAT_START, + b : CONFIG_ZMK_RGB_UNDERGLOW_BRT_START, + }, + animation_speed : CONFIG_ZMK_RGB_UNDERGLOW_SPD_START, + current_effect : CONFIG_ZMK_RGB_UNDERGLOW_EFF_START, + animation_step : 0, + on : IS_ENABLED(CONFIG_ZMK_RGB_UNDERGLOW_ON_START) + }; + #if ZMK_BLE_IS_CENTRAL k_work_init_delayable(&led_update_work, zmk_rgb_underglow_central_send); #endif