From 569cf8226b11d30f51866b707789a6991f34c14f Mon Sep 17 00:00:00 2001 From: Lasse Luttermann Date: Wed, 23 Aug 2023 23:43:00 +0200 Subject: [PATCH 1/3] Added timeout option for OLED boot logo. --- keyboards/doio/kb16/kb16.c | 4 +--- keyboards/doio/kb16/rev2/config.h | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboards/doio/kb16/kb16.c b/keyboards/doio/kb16/kb16.c index 34b315a87b15..6d466a940272 100644 --- a/keyboards/doio/kb16/kb16.c +++ b/keyboards/doio/kb16/kb16.c @@ -32,16 +32,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 diff --git a/keyboards/doio/kb16/rev2/config.h b/keyboards/doio/kb16/rev2/config.h index cc8d0a6830f7..000e4a114492 100644 --- a/keyboards/doio/kb16/rev2/config.h +++ b/keyboards/doio/kb16/rev2/config.h @@ -23,6 +23,9 @@ #define I2C1_SDA_PIN B11 #define I2C_DRIVER I2CD2 + /* Set timeout for displaying boot logo */ + #define OLED_LOGO_TIMEOUT 5000 + /* Use the custom font */ #define OLED_FONT_H "./lib/glcdfont.c" #endif From d42589e4eb8ad71a8d73272b0bb6dc278703c344 Mon Sep 17 00:00:00 2001 From: Lasse Luttermann Date: Thu, 24 Aug 2023 00:05:52 +0200 Subject: [PATCH 2/3] Added OLED_LOGO_TIMEOUT for rev1 boards --- keyboards/doio/kb16/rev1/config.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keyboards/doio/kb16/rev1/config.h b/keyboards/doio/kb16/rev1/config.h index 460fa439f640..9482e41732f5 100644 --- a/keyboards/doio/kb16/rev1/config.h +++ b/keyboards/doio/kb16/rev1/config.h @@ -20,6 +20,9 @@ /* Use the custom font */ #define OLED_FONT_H "./lib/glcdfont.c" +/* Set timeout for displaying boot logo */ +#define OLED_LOGO_TIMEOUT 5000 + #ifdef RGB_MATRIX_ENABLE /* RGB Matrix config */ #define RGB_MATRIX_LED_COUNT 16 From 89d8e5b1c591bf7305858b7779b78dd6e4f3bf49 Mon Sep 17 00:00:00 2001 From: Lasse Luttermann Date: Fri, 25 Aug 2023 10:32:40 +0200 Subject: [PATCH 3/3] Moved configuration default for OLED_LOGO_TIMEOUT --- keyboards/doio/kb16/kb16.c | 5 +++++ keyboards/doio/kb16/rev1/config.h | 3 --- keyboards/doio/kb16/rev2/config.h | 3 --- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/keyboards/doio/kb16/kb16.c b/keyboards/doio/kb16/kb16.c index 6d466a940272..05f5792ea7e6 100644 --- a/keyboards/doio/kb16/kb16.c +++ b/keyboards/doio/kb16/kb16.c @@ -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; diff --git a/keyboards/doio/kb16/rev1/config.h b/keyboards/doio/kb16/rev1/config.h index 9482e41732f5..460fa439f640 100644 --- a/keyboards/doio/kb16/rev1/config.h +++ b/keyboards/doio/kb16/rev1/config.h @@ -20,9 +20,6 @@ /* Use the custom font */ #define OLED_FONT_H "./lib/glcdfont.c" -/* Set timeout for displaying boot logo */ -#define OLED_LOGO_TIMEOUT 5000 - #ifdef RGB_MATRIX_ENABLE /* RGB Matrix config */ #define RGB_MATRIX_LED_COUNT 16 diff --git a/keyboards/doio/kb16/rev2/config.h b/keyboards/doio/kb16/rev2/config.h index 000e4a114492..cc8d0a6830f7 100644 --- a/keyboards/doio/kb16/rev2/config.h +++ b/keyboards/doio/kb16/rev2/config.h @@ -23,9 +23,6 @@ #define I2C1_SDA_PIN B11 #define I2C_DRIVER I2CD2 - /* Set timeout for displaying boot logo */ - #define OLED_LOGO_TIMEOUT 5000 - /* Use the custom font */ #define OLED_FONT_H "./lib/glcdfont.c" #endif