Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add core/fallback encoder behaviour #20320

Merged
merged 7 commits into from
Apr 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix lint errors
lint?

lint.
  • Loading branch information
waffle87 committed Apr 3, 2023
commit 56298ff94dc0945e355d4c466266b80d12527720
17 changes: 8 additions & 9 deletions quantum/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,19 @@ __attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) {
__attribute__((weak)) bool encoder_update_kb(uint8_t index, bool clockwise) {
bool res = encoder_update_user(index, clockwise);
if (res) {
if (clockwise) {
if (clockwise) {
#ifdef EXTRAKEY_ENABLE
tap_code_delay(KC_VOLU, 10);
tap_code_delay(KC_VOLU, 10);
#else
tap_code_delay(KC_PGDN, 10);
tap_code_delay(KC_PGDN, 10);
#endif
} else {
} else {
#ifdef EXTRAKEY_ENABLE
tap_code_delay(KC_VOLD, 10);
tap_code_delay(KC_VOLD, 10);
#else
tap_code_delay(KC_PGUP, 10);
tap_code_delay(KC_PGUP, 10);
#endif

}
}
}
return res;
}
Expand All @@ -108,7 +107,7 @@ void encoder_init(void) {
thisCount = isLeftHand ? NUM_ENCODERS_LEFT : NUM_ENCODERS_RIGHT;
thatCount = isLeftHand ? NUM_ENCODERS_RIGHT : NUM_ENCODERS_LEFT;
#else // SPLIT_KEYBOARD
thisCount = NUM_ENCODERS;
thisCount = NUM_ENCODERS;
#endif

#ifdef ENCODER_TESTS
Expand Down