fix the phosphoric fade effect on program 4
This commit is contained in:
		
							parent
							
								
									6a2de9a6a6
								
							
						
					
					
						commit
						5adce05f84
					
				@ -404,27 +404,20 @@ void led_rgb_4_typing(uint8_t preview, uint8_t tick)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // set rgb colors as appropriate
 | 
					    // set rgb colors as appropriate
 | 
				
			||||||
    for (i = 0; i < 9; i++) {
 | 
					    for (i = 0; i < 9; i++) {
 | 
				
			||||||
        if (i < typing_idx || ((i == typing_idx) && (typing_flash_state))) {
 | 
					        for (j = 0; j < 3; j++) {
 | 
				
			||||||
 | 
					            if ((i < typing_idx) || ((i == typing_idx) && typing_flash_state)) {
 | 
				
			||||||
                // these are on
 | 
					                // these are on
 | 
				
			||||||
            rgb[i][0] = typing[color][0];
 | 
					                rgb[i][j] = typing[color][j];
 | 
				
			||||||
            rgb[i][1] = typing[color][1];
 | 
					 | 
				
			||||||
            rgb[i][2] = typing[color][2];
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (i > typing_idx || ((i == typing_idx) && (!typing_flash_state))) {
 | 
					            if (i > typing_idx) { // || ((i == typing_idx) && !typing_flash_state)) {
 | 
				
			||||||
                // these are idle
 | 
					                // these are idle
 | 
				
			||||||
            rgb[i][0] = idle_glow[0];
 | 
					                rgb[i][j] = idle_glow[j];
 | 
				
			||||||
            rgb[i][1] = idle_glow[1];
 | 
					 | 
				
			||||||
            rgb[i][2] = idle_glow[2];
 | 
					 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // flashing cursor fadeout
 | 
					            // flashing cursor fadeout
 | 
				
			||||||
        if (i == typing_idx && typing_flash_state) {
 | 
					            if ((i == typing_idx) && !typing_flash_state) {
 | 
				
			||||||
            if (typing_flash_delay <= 8) {
 | 
					                if (rgb[i][j] > 32) rgb[i][j] -= 32; else rgb[i][j] = 0;
 | 
				
			||||||
                w = 8 - typing_flash_delay;
 | 
					 | 
				
			||||||
                rgb[i][0] >>= w; if (rgb[i][0] < idle_glow[0]) rgb[i][0] = idle_glow[0];
 | 
					 | 
				
			||||||
                rgb[i][1] >>= w; if (rgb[i][1] < idle_glow[1]) rgb[i][1] = idle_glow[1];
 | 
					 | 
				
			||||||
                rgb[i][2] >>= w; if (rgb[i][2] < idle_glow[2]) rgb[i][2] = idle_glow[2];
 | 
					 | 
				
			||||||
                update = 1;
 | 
					                update = 1;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user