[FIX] properly use animation_timer
This commit is contained in:
parent
ae6715c8ed
commit
774281a0b0
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user