Skip to content

Commit

Permalink
Fix loading from flash
Browse files Browse the repository at this point in the history
  • Loading branch information
ReFil committed Nov 1, 2023
1 parent 41e4c8d commit d291d20
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions app/src/rgb_underglow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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
Expand Down

0 comments on commit d291d20

Please sign in to comment.