File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
plugins/Kaleidoscope-Hardware-Keyboardio-Preonic/src/kaleidoscope/device/keyboardio Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -123,15 +123,15 @@ class PreonicKeyScanner : public kaleidoscope::driver::keyscanner::NRF52KeyScann
123123 // Direction-aware decimation to handle encoder bounce and direction changes
124124 static int8_t encoder_last_direction[NUM_ENCODERS] = {0 };
125125 static uint8_t encoder_step_counters[NUM_ENCODERS] = {0 };
126-
126+
127127 int8_t direction = (step < 0 ) ? -1 : 1 ;
128-
128+
129129 // Reset counter on direction change to avoid wrong-direction events
130130 if (encoder_last_direction[encoder_index] != direction) {
131- encoder_step_counters[encoder_index] = 0 ;
131+ encoder_step_counters[encoder_index] = 0 ;
132132 encoder_last_direction[encoder_index] = direction;
133133 }
134-
134+
135135 // Only process every Nth event in the same direction
136136 if (++encoder_step_counters[encoder_index] % ENCODER_STEPS_PER_DETENT != 0 ) return ;
137137
You can’t perform that action at this time.
0 commit comments