VIA compile fixes (#13054)
This commit is contained in:
		
							parent
							
								
									6bafefa886
								
							
						
					
					
						commit
						5a06813b10
					
				
					 7 changed files with 106 additions and 68 deletions
				
			
		| 
						 | 
				
			
			@ -56,3 +56,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
                     KC_TRNS, KC_TRNS
 | 
			
		||||
            ),
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
			
		||||
    if (index == 0) {
 | 
			
		||||
        if (get_highest_layer(layer_state) == 0) {
 | 
			
		||||
            uint16_t mapped_code = 0;
 | 
			
		||||
            if (clockwise) {
 | 
			
		||||
                mapped_code = handle_encoder_cw();
 | 
			
		||||
            } else {
 | 
			
		||||
                mapped_code = handle_encoder_ccw();
 | 
			
		||||
            }
 | 
			
		||||
            if (mapped_code != 0) {
 | 
			
		||||
                tap_code16(mapped_code);
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            if (clockwise) {
 | 
			
		||||
                if (oled_mode == OLED_MODE_CALC) {
 | 
			
		||||
                    handle_encoder_cw();
 | 
			
		||||
                } else if (oled_mode == OLED_MODE_DEFAULT) {
 | 
			
		||||
                    change_encoder_mode(false);
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                if (oled_mode == OLED_MODE_CALC) {
 | 
			
		||||
                    handle_encoder_ccw();
 | 
			
		||||
                } else if (oled_mode == OLED_MODE_DEFAULT) {
 | 
			
		||||
                    change_encoder_mode(true);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    return true;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue