mirror of
				https://github.com/mfulz/qmk_firmware.git
				synced 2025-11-04 07:12:33 +01:00 
			
		
		
		
	[Keyboard] Fix compilation issues for Mechlovin Adelais (#18019)
This commit is contained in:
		
							parent
							
								
									a1fe9fe3b3
								
							
						
					
					
						commit
						ea2ec5835b
					
				@ -51,15 +51,13 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
				
			|||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            tap_code(KC_VOLU);
 | 
					            tap_code(KC_VOLU);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    } else if (index == 1) {
 | 
				
			||||||
    else if (index == 1) {
 | 
					 | 
				
			||||||
        if (clockwise) {
 | 
					        if (clockwise) {
 | 
				
			||||||
            tap_code(KC_LEFT);
 | 
					            tap_code(KC_LEFT);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            tap_code(KC_RGHT);
 | 
					            tap_code(KC_RGHT);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    } else if (index == 2) {
 | 
				
			||||||
    else if (index == 2) {
 | 
					 | 
				
			||||||
        if (clockwise) {
 | 
					        if (clockwise) {
 | 
				
			||||||
            tap_code(KC_UP);
 | 
					            tap_code(KC_UP);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
@ -69,44 +67,46 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
				
			|||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  #endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
					bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
				
			||||||
  if (record->event.pressed) {
 | 
					    if (record->event.pressed) {
 | 
				
			||||||
    switch(keycode) {
 | 
					        switch (keycode) {
 | 
				
			||||||
        case KC_F13: // toggle rgb matrix
 | 
					#ifdef RGB_MATRIX_ENABLE
 | 
				
			||||||
            rgb_matrix_toggle();
 | 
					            case KC_F13: // toggle rgb matrix
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_toggle();
 | 
				
			||||||
        case KC_F14:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_step();
 | 
					            case KC_F14:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_step();
 | 
				
			||||||
        case KC_F15:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_increase_speed();
 | 
					            case KC_F15:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_increase_speed();
 | 
				
			||||||
        case KC_F16:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_decrease_speed();
 | 
					            case KC_F16:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_decrease_speed();
 | 
				
			||||||
        case KC_F17:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_increase_hue();
 | 
					            case KC_F17:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_increase_hue();
 | 
				
			||||||
        case KC_F18:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_decrease_hue();
 | 
					            case KC_F18:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_decrease_hue();
 | 
				
			||||||
        case KC_F19:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_increase_sat();
 | 
					            case KC_F19:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_increase_sat();
 | 
				
			||||||
        case KC_F20:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_decrease_sat();
 | 
					            case KC_F20:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_decrease_sat();
 | 
				
			||||||
        case KC_F21:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_increase_val();
 | 
					            case KC_F21:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_increase_val();
 | 
				
			||||||
        case KC_F22:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_decrease_val();
 | 
					            case KC_F22:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_decrease_val();
 | 
				
			||||||
        default:
 | 
					                return false;
 | 
				
			||||||
        break;
 | 
					#endif
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					    return true;
 | 
				
			||||||
  return true;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -65,15 +65,13 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
				
			|||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            tap_code(KC_VOLU);
 | 
					            tap_code(KC_VOLU);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    } else if (index == 1) {
 | 
				
			||||||
    else if (index == 1) {
 | 
					 | 
				
			||||||
        if (clockwise) {
 | 
					        if (clockwise) {
 | 
				
			||||||
            tap_code(KC_LEFT);
 | 
					            tap_code(KC_LEFT);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            tap_code(KC_RGHT);
 | 
					            tap_code(KC_RGHT);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    } else if (index == 2) {
 | 
				
			||||||
    else if (index == 2) {
 | 
					 | 
				
			||||||
        if (clockwise) {
 | 
					        if (clockwise) {
 | 
				
			||||||
            tap_code(KC_UP);
 | 
					            tap_code(KC_UP);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
@ -83,44 +81,46 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
 | 
				
			|||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  #endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
					bool process_record_user(uint16_t keycode, keyrecord_t *record) {
 | 
				
			||||||
  if (record->event.pressed) {
 | 
					    if (record->event.pressed) {
 | 
				
			||||||
    switch(keycode) {
 | 
					        switch (keycode) {
 | 
				
			||||||
        case BL_TOG: // toggle rgb matrix
 | 
					#ifdef RGB_MATRIX_ENABLE
 | 
				
			||||||
            rgb_matrix_toggle();
 | 
					            case BL_TOG: // toggle rgb matrix
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_toggle();
 | 
				
			||||||
        case BL_EFFECT:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_step();
 | 
					            case BL_EFFECT:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_step();
 | 
				
			||||||
        case BL_ISPD:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_increase_speed();
 | 
					            case BL_ISPD:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_increase_speed();
 | 
				
			||||||
        case BL_DSPD:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_decrease_speed();
 | 
					            case BL_DSPD:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_decrease_speed();
 | 
				
			||||||
        case BL_IHUE:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_increase_hue();
 | 
					            case BL_IHUE:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_increase_hue();
 | 
				
			||||||
        case BL_DHUE:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_decrease_hue();
 | 
					            case BL_DHUE:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_decrease_hue();
 | 
				
			||||||
        case BL_ISAT:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_increase_sat();
 | 
					            case BL_ISAT:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_increase_sat();
 | 
				
			||||||
        case BL_DSAT:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_decrease_sat();
 | 
					            case BL_DSAT:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_decrease_sat();
 | 
				
			||||||
        case BL_IVAL:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_increase_val();
 | 
					            case BL_IVAL:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_increase_val();
 | 
				
			||||||
        case BL_DVAL:
 | 
					                return false;
 | 
				
			||||||
            rgb_matrix_decrease_val();
 | 
					            case BL_DVAL:
 | 
				
			||||||
            return false;
 | 
					                rgb_matrix_decrease_val();
 | 
				
			||||||
        default:
 | 
					                return false;
 | 
				
			||||||
        break;
 | 
					#endif
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					    return true;
 | 
				
			||||||
  return true;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user