aboutsummaryrefslogtreecommitdiff
path: root/users/drashna/oled_stuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/drashna/oled_stuff.c')
-rw-r--r--users/drashna/oled_stuff.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c
index 46288aad2..30eb068f7 100644
--- a/users/drashna/oled_stuff.c
+++ b/users/drashna/oled_stuff.c
@@ -16,8 +16,6 @@
16 16
17#include "drashna.h" 17#include "drashna.h"
18 18
19extern uint8_t is_master;
20
21#ifndef KEYLOGGER_LENGTH 19#ifndef KEYLOGGER_LENGTH
22// # ifdef OLED_DISPLAY_128X64 20// # ifdef OLED_DISPLAY_128X64
23# define KEYLOGGER_LENGTH ((int)(OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH)) 21# define KEYLOGGER_LENGTH ((int)(OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH))
@@ -187,11 +185,11 @@ void render_bootmagic_status(void) {
187 }; 185 };
188 186
189 bool is_bootmagic_on; 187 bool is_bootmagic_on;
190 #ifdef OLED_DISPLAY_128X64 188#ifdef OLED_DISPLAY_128X64
191 is_bootmagic_on = !keymap_config.swap_lctl_lgui; 189 is_bootmagic_on = !keymap_config.swap_lctl_lgui;
192 #else 190#else
193 is_bootmagic_on = keymap_config.swap_lctl_lgui; 191 is_bootmagic_on = keymap_config.swap_lctl_lgui;
194 #endif 192#endif
195 193
196 oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NAME), false); 194 oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NAME), false);
197#ifdef OLED_DISPLAY_128X64 195#ifdef OLED_DISPLAY_128X64
@@ -259,21 +257,20 @@ void render_status_secondary(void) {
259#if !defined(SPLIT_TRANSPORT_MIRROR) || defined(OLED_DISPLAY_128X64) 257#if !defined(SPLIT_TRANSPORT_MIRROR) || defined(OLED_DISPLAY_128X64)
260 oled_driver_render_logo(); 258 oled_driver_render_logo();
261#endif 259#endif
262#ifdef SPLIT_TRANSPORT_MIRROR
263 /* Show Keyboard Layout */ 260 /* Show Keyboard Layout */
264 render_default_layer_state(); 261 render_default_layer_state();
265 render_layer_state(); 262 render_layer_state();
266 render_mod_status(get_mods() | get_oneshot_mods()); 263 render_mod_status(get_mods() | get_oneshot_mods());
267 render_keylogger_status(); 264 render_keylogger_status();
268 265
269#endif
270} 266}
271// clang-format on 267// clang-format on
272 268
273void render_status_main(void) { 269void render_status_main(void) {
270 oled_driver_render_logo();
274 /* Show Keyboard Layout */ 271 /* Show Keyboard Layout */
275 render_default_layer_state(); 272 render_default_layer_state();
276 render_keylock_status(host_keyboard_leds()); 273 // render_keylock_status(host_keyboard_leds());
277 render_bootmagic_status(); 274 render_bootmagic_status();
278 render_user_status(); 275 render_user_status();
279 276
@@ -281,19 +278,15 @@ void render_status_main(void) {
281} 278}
282 279
283void oled_task_user(void) { 280void oled_task_user(void) {
284 if (timer_elapsed32(oled_timer) > 30000) {
285 oled_off();
286 return;
287 }
288#ifndef SPLIT_KEYBOARD
289 else {
290 oled_on();
291 }
292#endif
293
294 update_log(); 281 update_log();
295 282
296 if (is_master) { 283 if (is_keyboard_master()) {
284 if (timer_elapsed32(oled_timer) > 30000) {
285 oled_off();
286 return;
287 } else {
288 oled_on();
289 }
297 render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) 290 render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
298 } else { 291 } else {
299 render_status_secondary(); 292 render_status_secondary();