Skip to content

Commit

Permalink
doio/kb16: Added timeout option for OLED boot logo. (qmk#21823)
Browse files Browse the repository at this point in the history
  • Loading branch information
luttermann authored and autoferrit committed Dec 6, 2023
1 parent d92b91d commit 86ac26c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions keyboards/doio/kb16/kb16.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
// OLED animation
#include "./lib/logo.h"

// Default timeout for displaying boot logo.
#ifndef OLED_LOGO_TIMEOUT
#define OLED_LOGO_TIMEOUT 5000
#endif

#ifdef OLED_ENABLE
uint16_t startup_timer;

Expand All @@ -32,16 +37,14 @@
bool oled_task_kb(void) {
static bool finished_logo = false;

if ((timer_elapsed(startup_timer) < 5000) && !finished_logo) {
if ((timer_elapsed(startup_timer) < OLED_LOGO_TIMEOUT) && !finished_logo) {
render_logo();
} else {
finished_logo = true;

if (!oled_task_user()) {
return false;
}
}

return true;
}
#endif
Expand Down

0 comments on commit 86ac26c

Please sign in to comment.