summaryrefslogtreecommitdiffstats
path: root/users/drashna/oled/oled_stuff.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-08-28 12:55:19 -0700
committerGitHub <noreply@github.com>2022-08-28 12:55:19 -0700
commitfa08cb2478e8c13a9f1c785956c95cb49bbebba3 (patch)
tree82de917cdbf9221db824843a85bb7925ff905fc0 /users/drashna/oled/oled_stuff.c
parentd4a6ee1cad73ab88ac3faecf2d40204c8e706b5a (diff)
[Keymap] Drashna keymap updates for 0.18.0 (#18184)
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'users/drashna/oled/oled_stuff.c')
-rw-r--r--users/drashna/oled/oled_stuff.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/users/drashna/oled/oled_stuff.c b/users/drashna/oled/oled_stuff.c
index 5baf5b558b..e082f8ab3e 100644
--- a/users/drashna/oled/oled_stuff.c
+++ b/users/drashna/oled/oled_stuff.c
@@ -28,6 +28,8 @@
#endif
#include <string.h>
+bool is_oled_enabled = true;
+
extern bool host_driver_disabled;
uint32_t oled_timer = 0;
@@ -850,7 +852,7 @@ void render_status_right(void) {
render_layer_state(1, 2);
render_mod_status(get_mods() | get_oneshot_mods(), 1, 5);
#if !defined(OLED_DISPLAY_VERBOSE) && defined(WPM_ENABLE) && !defined(STM32F303xC)
- render_wpm(2);
+ render_wpm(2, 7, 1);
#endif
render_keylock_status(host_keyboard_led_state(), 1, 6);
}
@@ -929,16 +931,14 @@ __attribute__((weak)) bool oled_task_keymap(void) {
}
bool oled_task_user(void) {
- if (is_keyboard_master()) {
#ifndef OLED_DISPLAY_TEST
- if (timer_elapsed32(oled_timer) > 60000) {
- oled_off();
- return false;
- } else
+ if (!is_oled_enabled) {
+ oled_off();
+ return false;
+ } else
#endif
- {
- oled_on();
- }
+ {
+ oled_on();
}
if (!oled_task_keymap()) {
@@ -990,3 +990,9 @@ bool oled_task_user(void) {
return false;
}
+
+extern bool oled_initialized;
+
+__attribute__((weak)) void matrix_scan_oled(void) {
+ is_oled_enabled = !(timer_elapsed32(oled_timer) > 60000);
+}