Skip to content

Commit

Permalink
fix build if EXPERIMENTAL_RGB_LAYER not set
Browse files Browse the repository at this point in the history
  • Loading branch information
darknao committed May 25, 2024
1 parent 169afd4 commit 5b327c2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/src/rgb_underglow.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,6 @@ static void zmk_rgb_underglow_tick(struct k_work *work) {
case UNDERGLOW_EFFECT_SWIRL:
zmk_rgb_underglow_effect_swirl();
break;
case UNDERGLOW_EFFECT_LAYER_INDICATORS:
// zmk_rgb_underglow_set_layer();
break;
}

zmk_led_write_pixels();
Expand All @@ -508,7 +505,7 @@ static void zmk_rgb_underglow_tick(struct k_work *work) {
K_WORK_DEFINE(underglow_tick_work, zmk_rgb_underglow_tick);

static void zmk_rgb_underglow_tick_handler(struct k_timer *timer) {
if (!state.on || state.current_effect == UNDERGLOW_EFFECT_LAYER_INDICATORS) {
if (!state.on || state.layer_enabled) {
return;
}

Expand Down Expand Up @@ -643,9 +640,11 @@ void zmk_rgb_set_ext_power(void) {

int zmk_rgb_underglow_on(void) {
zmk_rgb_underglow_transient_on();
#if IS_ENABLED(UNDERGLOW_LAYER_ENABLED)
if (state.current_effect == UNDERGLOW_EFFECT_LAYER_INDICATORS) {
state.layer_enabled = true;
}
#endif
return zmk_rgb_underglow_save_state();
}

Expand Down Expand Up @@ -704,7 +703,9 @@ int zmk_rgb_underglow_select_effect(int effect) {

state.current_effect = effect;
state.animation_step = 0;
#if IS_ENABLED(UNDERGLOW_LAYER_ENABLED)
state.layer_enabled = (effect == UNDERGLOW_EFFECT_LAYER_INDICATORS);
#endif
return zmk_rgb_underglow_save_state();
}

Expand Down

0 comments on commit 5b327c2

Please sign in to comment.