Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added timeout option for OLED boot logo. #21823

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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