Fix encoder breakage with 4 or more encoders (#23595)

pull/23631/head 0.24.8
Sergey Vlasov 2024-04-27 02:28:29 +03:00 committed by GitHub
parent 2893038fda
commit 2224a768d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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) {