[Keyboard] Fix compilation issues for Mechlovin Adelais (#18019)

This commit is contained in:
Drashna Jaelre 2022-08-12 17:44:33 -07:00 committed by GitHub
parent a1fe9fe3b3
commit ea2ec5835b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 82 additions and 82 deletions

View File

@ -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 {
@ -74,6 +72,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
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) {
#ifdef RGB_MATRIX_ENABLE
case KC_F13: // toggle rgb matrix case KC_F13: // toggle rgb matrix
rgb_matrix_toggle(); rgb_matrix_toggle();
return false; return false;
@ -104,6 +103,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case KC_F22: case KC_F22:
rgb_matrix_decrease_val(); rgb_matrix_decrease_val();
return false; return false;
#endif
default: default:
break; break;
} }

View File

@ -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 {
@ -88,6 +86,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
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) {
#ifdef RGB_MATRIX_ENABLE
case BL_TOG: // toggle rgb matrix case BL_TOG: // toggle rgb matrix
rgb_matrix_toggle(); rgb_matrix_toggle();
return false; return false;
@ -118,6 +117,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case BL_DVAL: case BL_DVAL:
rgb_matrix_decrease_val(); rgb_matrix_decrease_val();
return false; return false;
#endif
default: default:
break; break;
} }