Customizable LED test duration (#3086)
* Customizable LED test duration Code by Jack. :) * only need an unit8_t
This commit is contained in:
		
				
					committed by
					
						
						Jack Humbert
					
				
			
			
				
	
			
			
			
						parent
						
							b2398ecbe7
						
					
				
				
					commit
					21ad968ac1
				
			@@ -149,8 +149,9 @@ void rgb_matrix_set_suspend_state(bool state) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void rgb_matrix_test(void) {
 | 
					void rgb_matrix_test(void) {
 | 
				
			||||||
    // Mask out bits 4 and 5
 | 
					    // Mask out bits 4 and 5
 | 
				
			||||||
    // This 2-bit value will stay the same for 16 ticks.
 | 
					    // Increase the factor to make the test animation slower (and reduce to make it faster)
 | 
				
			||||||
    switch ( (g_tick & 0x30) >> 4 )
 | 
					    uint8_t factor = 10;
 | 
				
			||||||
 | 
					    switch ( (g_tick & (0b11 << factor)) >> factor )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        case 0:
 | 
					        case 0:
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user