Browse Source

ploopyco: fix bitwise typos in opt_encoder_tiny state definitions (#26288)

Fixes a bug in the state machine definitions within `opt_encoder_tiny.c` that caused severely delayed or unresponsive scrolling.
Benoit Brummer 1 month ago
parent
commit
198026cf27
1 changed files with 2 additions and 2 deletions
  1. 2 2
      keyboards/ploopyco/common/opt_encoder_tiny.c

+ 2 - 2
keyboards/ploopyco/common/opt_encoder_tiny.c

@@ -78,9 +78,9 @@ typedef enum {
     UP_BEGIN_MID,
     UP_BEGIN_MID,
     STATE_MASK    = 0xf, /* 0b1111 */
     STATE_MASK    = 0xf, /* 0b1111 */
     EMIT_UP       = 0x10,
     EMIT_UP       = 0x10,
-    EMIT_UP_MID   = EMIT_UP & START_MID,
+    EMIT_UP_MID   = EMIT_UP | START_MID,
     EMIT_DOWN     = 0x80,
     EMIT_DOWN     = 0x80,
-    EMIT_DOWN_MID = EMIT_DOWN & START_MID,
+    EMIT_DOWN_MID = EMIT_DOWN | START_MID,
     EMIT_MASK     = 0xf0
     EMIT_MASK     = 0xf0
 } encoder_state_t;
 } encoder_state_t;