},
};
-static uint8_t fade_led_color(keyframe_animation_t* animation, uint8_t from, uint8_t to) {
+static uint8_t fade_led_color(keyframe_animation_t* animation, int from, int to) {
int frame_length = animation->frame_lengths[animation->current_frame];
int current_pos = frame_length - animation->time_left_in_frame;
int delta = to - from;
bool keyframe_led_left_to_right_gradient(keyframe_animation_t* animation, visualizer_state_t* state) {
(void)state;
- int frame_length = animation->frame_lengths[animation->current_frame];
- int current_pos = frame_length - animation->time_left_in_frame;
+ float frame_length = animation->frame_lengths[animation->current_frame];
+ float current_pos = frame_length - animation->time_left_in_frame;
float t = current_pos / frame_length;
for (int i=0; i< NUM_COLS; i++) {
uint8_t color = compute_gradient_color(t, i, NUM_COLS);
bool keyframe_led_top_to_bottom_gradient(keyframe_animation_t* animation, visualizer_state_t* state) {
(void)state;
- int frame_length = animation->frame_lengths[animation->current_frame];
- int current_pos = frame_length - animation->time_left_in_frame;
+ float frame_length = animation->frame_lengths[animation->current_frame];
+ float current_pos = frame_length - animation->time_left_in_frame;
float t = current_pos / frame_length;
for (int i=0; i< NUM_ROWS; i++) {
uint8_t color = compute_gradient_color(t, i, NUM_ROWS);
(void)state;
(void)animation;
gdispGSetOrientation(LED_DISPLAY, GDISP_ROTATE_180);
- return true;
+ return false;
}
bool keyframe_normal_led_orientation(keyframe_animation_t* animation, visualizer_state_t* state) {
(void)state;
(void)animation;
gdispGSetOrientation(LED_DISPLAY, GDISP_ROTATE_0);
- return true;
+ return false;
}