From 2224a768d598fe30bbfb80e11cac6d7704680371 Mon Sep 17 00:00:00 2001 From: Sergey Vlasov Date: Sat, 27 Apr 2024 02:28:29 +0300 Subject: [PATCH] Fix encoder breakage with 4 or more encoders (#23595) --- quantum/encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/encoder.c b/quantum/encoder.c index 0a48ac9a07..2ddbf3ee1e 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -83,7 +83,7 @@ bool encoder_task(void) { } bool encoder_queue_full_advanced(encoder_events_t *events) { - return events->head == (events->tail - 1) % MAX_QUEUED_ENCODER_EVENTS; + return events->tail == (events->head + 1) % MAX_QUEUED_ENCODER_EVENTS; } bool encoder_queue_full(void) {