uint8_t luma = fade_led_color(animation, from, to);
color_t color = LUMA2COLOR(luma);
gdispGClear(LED_DISPLAY, color);
- gdispGFlush(LED_DISPLAY);
}
// TODO: Should be customizable per keyboard
uint8_t color = compute_gradient_color(t, i, NUM_COLS);
gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color));
}
- gdispGFlush(LED_DISPLAY);
return true;
}
uint8_t color = compute_gradient_color(t, i, NUM_ROWS);
gdispGDrawLine(LED_DISPLAY, 0, i, NUM_COLS - 1, i, LUMA2COLOR(color));
}
- gdispGFlush(LED_DISPLAY);
return true;
}
gdispGDrawPixel(LED_DISPLAY, j, i, color);
}
}
- gdispGFlush(LED_DISPLAY);
return true;
}
}
static bool update_keyframe_animation(keyframe_animation_t* animation, visualizer_state_t* state, systime_t delta, systime_t* sleep_time) {
+ // TODO: Clean up this messy code
dprintf("Animation frame%d, left %d, delta %d\n", animation->current_frame,
animation->time_left_in_frame, delta);
if (animation->current_frame == animation->num_frames) {
update_keyframe_animation(animations[i], &state, delta, &sleep_time);
}
}
+#ifdef LED_ENABLE
+ gdispGFlush(LED_DISPLAY);
+#endif
// The animation can enable the visualizer
// And we might need to update the state when that happens
// so don't sleep