diff options
| author | Sergey Vlasov <sigprof@gmail.com> | 2024-04-27 02:28:29 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-27 09:28:29 +1000 |
| commit | 2224a768d598fe30bbfb80e11cac6d7704680371 (patch) | |
| tree | 504b2ccd923081bb7e897aaaeab54e67a5e8b5e5 /quantum/encoder.c | |
| parent | 2893038fda6cd19ef84d92afa4ae8c4615698e38 (diff) | |
Fix encoder breakage with 4 or more encoders (#23595)
Diffstat (limited to 'quantum/encoder.c')
| -rw-r--r-- | quantum/encoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | bool encoder_queue_full_advanced(encoder_events_t *events) { | 85 | bool encoder_queue_full_advanced(encoder_events_t *events) { |
| 86 | return events->head == (events->tail - 1) % MAX_QUEUED_ENCODER_EVENTS; | 86 | return events->tail == (events->head + 1) % MAX_QUEUED_ENCODER_EVENTS; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | bool encoder_queue_full(void) { | 89 | bool encoder_queue_full(void) { |
