Update app/src/rgb_underglow.c
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
This commit is contained in:
parent
497b0a2256
commit
111a6daecd
1 changed files with 4 additions and 4 deletions
|
@ -273,12 +273,12 @@ static int zmk_rgb_underglow_init(const struct device *_arg) {
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB)
|
#if IS_ENABLED(CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB)
|
||||||
state.on = zmk_usb_is_powered();
|
state.on = zmk_usb_is_powered();
|
||||||
if (state.on)
|
|
||||||
k_timer_start(&underglow_tick, K_NO_WAIT, K_MSEC(50));
|
|
||||||
#else
|
|
||||||
k_timer_start(&underglow_tick, K_NO_WAIT, K_MSEC(50));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (state.on) {
|
||||||
|
k_timer_start(&underglow_tick, K_NO_WAIT, K_MSEC(50));
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue