remove the animation timer
All checks were successful
Build / build-sporq (push) Successful in 1m47s

This commit is contained in:
Marius Alwan Meyer 2023-06-04 21:22:19 +02:00
parent c64366b44d
commit e7e0609f8f

View File

@ -467,9 +467,6 @@ static void render_layer_state(void) {
// End of aurora corne things
// point to render_left() or render_right() after olet_int_user() ran
void (*render)(void);
void render_left(void) {
// Renders the current keyboard state (layers and mods)
render_logo();
@ -485,7 +482,8 @@ void render_right(void) {
render_space_animation();
}
static uint16_t animation_timer;
// point to render_left() or render_right() after olet_int_user() ran
void (*render)(void);
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
// define what's rendered on each half
@ -496,15 +494,10 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
render = render_right;
rotation = OLED_ROTATION_0;
}
animation_timer = timer_read();
return rotation;
}
bool oled_task_user(void) {
if (timer_elapsed(animation_timer) < FRAME_TIMEOUT) {
return false;
}
(*render)(); // call render_left() or render_right()
animation_timer = timer_read();
return false;
}