From 774281a0b0f846431063dff92f7072edc3e669d2 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+sporqist@users.noreply.github.com> Date: Thu, 1 Jun 2023 21:20:08 +0200 Subject: [PATCH] [FIX] properly use animation_timer --- keyboards/splitkb/aurora/corne/keymaps/sporq/oled.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/keyboards/splitkb/aurora/corne/keymaps/sporq/oled.c b/keyboards/splitkb/aurora/corne/keymaps/sporq/oled.c index 758dfe02bb..0ee7098a02 100644 --- a/keyboards/splitkb/aurora/corne/keymaps/sporq/oled.c +++ b/keyboards/splitkb/aurora/corne/keymaps/sporq/oled.c @@ -20,11 +20,11 @@ static uint16_t animation_timer = 0; #define SLEEP_TIMEOUT 30000 oled_rotation_t oled_init_user(oled_rotation_t rotation) { - animation_timer = timer_read(); if (!is_keyboard_master()) { return OLED_ROTATION_0; // flips the display 180 degrees if offhand } return OLED_ROTATION_270; + animation_timer = timer_read(); } @@ -471,7 +471,6 @@ bool oled_task_user(void) { return false; } if (is_keyboard_master()) { - animation_timer = timer_read(); // Renders the current keyboard state (layers and mods) render_logo(); render_logo_text(); @@ -482,12 +481,9 @@ bool oled_task_user(void) { render_mod_status_ctrl_shift(get_mods()|get_oneshot_mods()); render_kb_LED_state(); } else { - // time for the next frame? - if (timer_elapsed(animation_timer) > FRAME_TIMEOUT) { - animation_timer = timer_read(); - render_space_animation(); - } + render_space_animation(); } + animation_timer = timer_read(); return false; } #endif