[Keymap] fixed oled turn-off issue for crkbd:gotham (#16748)
This commit is contained in:
parent
6d816d94f7
commit
935af9e999
4 changed files with 18 additions and 13 deletions
|
@ -144,6 +144,7 @@ void render_feature_status(void) {
|
|||
// Keylogger
|
||||
#define KEYLOGGER_LENGTH 5
|
||||
static uint16_t oled_timer = 0;
|
||||
static bool is_key_processed = true;
|
||||
static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"};
|
||||
// clang-format off
|
||||
static const char PROGMEM code_to_name[0xFF] = {
|
||||
|
@ -247,18 +248,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
|||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
if (timer_elapsed(oled_timer) > 10000) {
|
||||
oled_off();
|
||||
return;
|
||||
}
|
||||
#ifndef SPLIT_KEYBOARD
|
||||
else {
|
||||
oled_on();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (is_keyboard_master()) {
|
||||
render_status_main();
|
||||
if (is_key_processed && (timer_elapsed(oled_timer) < OLED_KEY_TIMEOUT)) {
|
||||
render_status_main();
|
||||
} else {
|
||||
is_key_processed = false;
|
||||
oled_off();
|
||||
}
|
||||
} else {
|
||||
render_status_secondary();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue