Z3 fixes and tweaks
This commit is contained in:
parent
a0b83d546f
commit
590c0c6e4f
2 changed files with 6 additions and 1 deletions
|
@ -330,7 +330,7 @@ config ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE
|
|||
|
||||
config ZMK_RGB_UNDERGLOW_AUTO_OFF_USB
|
||||
bool "Turn off RGB underglow when USB is disconnected"
|
||||
depends on USB
|
||||
depends on USB_DEVICE_STACK
|
||||
|
||||
#ZMK_RGB_UNDERGLOW
|
||||
endif
|
||||
|
|
|
@ -271,6 +271,11 @@ static int zmk_rgb_underglow_init(const struct device *_arg) {
|
|||
settings_load_subtree("rgb/underglow");
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB)
|
||||
if(!zmk_usb_is_powered())
|
||||
state.on = false;
|
||||
#endif
|
||||
|
||||
k_timer_start(&underglow_tick, K_NO_WAIT, K_MSEC(50));
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue