forked from mirrors/qmk_userspace
		
	doio/kb16: Added timeout option for OLED boot logo. (#21823)
This commit is contained in:
		
					parent
					
						
							
								fbb61c3b1d
							
						
					
				
			
			
				commit
				
					
						ce51fdfe51
					
				
			
		
					 1 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
					@ -20,6 +20,11 @@
 | 
				
			||||||
// OLED animation
 | 
					// OLED animation
 | 
				
			||||||
#include "./lib/logo.h"
 | 
					#include "./lib/logo.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Default timeout for displaying boot logo.
 | 
				
			||||||
 | 
					#ifndef OLED_LOGO_TIMEOUT
 | 
				
			||||||
 | 
					    #define OLED_LOGO_TIMEOUT 5000
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef OLED_ENABLE
 | 
					#ifdef OLED_ENABLE
 | 
				
			||||||
    uint16_t startup_timer; 
 | 
					    uint16_t startup_timer; 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,16 +37,14 @@
 | 
				
			||||||
    bool oled_task_kb(void) {
 | 
					    bool oled_task_kb(void) {
 | 
				
			||||||
        static bool finished_logo = false;
 | 
					        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();
 | 
					            render_logo();
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            finished_logo = true;
 | 
					            finished_logo = true;
 | 
				
			||||||
			
 | 
					 | 
				
			||||||
            if (!oled_task_user()) {
 | 
					            if (!oled_task_user()) {
 | 
				
			||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					 | 
				
			||||||
        return true;
 | 
					        return true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue