summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/encoder.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/quantum/encoder.c b/quantum/encoder.c
index c30bf01cb2..8fb87281c2 100644
--- a/quantum/encoder.c
+++ b/quantum/encoder.c
@@ -119,6 +119,11 @@ static bool encoder_update(uint8_t index, uint8_t state) {
encoder_update_kb(index, ENCODER_CLOCKWISE);
}
encoder_pulses[i] %= resolution;
+#ifdef ENCODER_DEFAULT_POS
+ if ((state & 0x3) == ENCODER_DEFAULT_POS) {
+ encoder_pulses[i] = 0;
+ }
+#endif
return changed;
}