fix: disable fade animation in layer indicator effect
The effect_layer() tick handler was fading all pixels to black every frame, then calling transient_off() which killed RGB entirely. Layer colors are static — set by set_layer() on layer change events. No per-frame animation needed.
This commit is contained in:
parent
9ab9c4619f
commit
89a8f1e664
1 changed files with 2 additions and 14 deletions
|
|
@ -212,20 +212,8 @@ static void zmk_rgb_underglow_effect_swirl(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void zmk_rgb_underglow_effect_layer(void) {
|
static void zmk_rgb_underglow_effect_layer(void) {
|
||||||
bool active = false;
|
// Layer indicator colors are static — set by set_layer() on layer change.
|
||||||
for (int i = 0; i < STRIP_NUM_PIXELS; i++) {
|
// No per-frame animation needed.
|
||||||
pixels[i].r -= state.animation_speed < pixels[i].r ? state.animation_speed : pixels[i].r;
|
|
||||||
pixels[i].g -= state.animation_speed < pixels[i].g ? state.animation_speed : pixels[i].g;
|
|
||||||
pixels[i].b -= state.animation_speed < pixels[i].b ? state.animation_speed : pixels[i].b;
|
|
||||||
if (pixels[i].r || pixels[i].g || pixels[i].b) {
|
|
||||||
active = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
state.animation_step += state.animation_speed;
|
|
||||||
|
|
||||||
if (state.animation_step > 255 || !active) {
|
|
||||||
zmk_rgb_underglow_transient_off();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int zmk_led_generate_status(void);
|
static int zmk_led_generate_status(void);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue