Skip to content

Commit

Permalink
Better check?
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna authored and zvecr committed Nov 13, 2022
1 parent 2073590 commit 982d33c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions quantum/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,13 @@ static bool encoder_update(uint8_t index, uint8_t state) {

encoder_value[index]++;
changed = true;
#ifdef SPLIT_KEYBOARD
if (is_keyboard_master())
#endif // SPLIT_KEYBOARD
#ifdef ENCODER_MAP_ENABLE
encoder_exec_mapping(index, ENCODER_COUNTER_CLOCKWISE);
encoder_exec_mapping(index, ENCODER_COUNTER_CLOCKWISE);
#else // ENCODER_MAP_ENABLE
if (is_keyboard_master()) {
encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE);
}
encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE);
#endif // ENCODER_MAP_ENABLE
}

Expand All @@ -195,12 +196,13 @@ static bool encoder_update(uint8_t index, uint8_t state) {
#endif
encoder_value[index]--;
changed = true;
#ifdef SPLIT_KEYBOARD
if (is_keyboard_master())
#endif // SPLIT_KEYBOARD
#ifdef ENCODER_MAP_ENABLE
encoder_exec_mapping(index, ENCODER_CLOCKWISE);
encoder_exec_mapping(index, ENCODER_CLOCKWISE);
#else // ENCODER_MAP_ENABLE
if (is_keyboard_master()) {
encoder_update_kb(index, ENCODER_CLOCKWISE);
}
encoder_update_kb(index, ENCODER_CLOCKWISE);
#endif // ENCODER_MAP_ENABLE
}
encoder_pulses[i] %= resolution;
Expand Down

0 comments on commit 982d33c

Please sign in to comment.