aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/encoder.c
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-01-19 16:30:34 +0000
committerGitHub <noreply@github.com>2020-01-19 16:30:34 +0000
commit667045b4928badaedb38f535d885a46ff8a454fb (patch)
tree5ae5e7002381a7359eabe627b936f0c253e2822e /quantum/encoder.c
parentf5209aa4e941c7f3a942ef4a7e256ab432ec98ce (diff)
downloadfirmware-667045b4928badaedb38f535d885a46ff8a454fb.tar.gz
firmware-667045b4928badaedb38f535d885a46ff8a454fb.tar.bz2
firmware-667045b4928badaedb38f535d885a46ff8a454fb.zip
Run clang-format manually to fix recently changed files (#7934)
* Run clang-format manually to fix recently changed files * Run clang-format manually to fix recently changed files - revert template files * Run clang-format manually to fix recently changed files - format off for ascii_to_keycode_lut
Diffstat (limited to 'quantum/encoder.c')
-rw-r--r--quantum/encoder.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/encoder.c b/quantum/encoder.c
index c41b89f49..8e11562eb 100644
--- a/quantum/encoder.c
+++ b/quantum/encoder.c
@@ -37,8 +37,8 @@ static pin_t encoders_pad_b[] = ENCODERS_PAD_B;
static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0};
-static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0};
-static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0};
+static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0};
+static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0};
#ifdef SPLIT_KEYBOARD
// right half encoders come over as second set of encoders
@@ -88,7 +88,7 @@ static void encoder_update(int8_t index, uint8_t state) {
encoder_value[index]++;
encoder_update_kb(index, true);
}
- if (encoder_pulses[i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
+ if (encoder_pulses[i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
encoder_value[index]--;
encoder_update_kb(index, false);
}
@@ -109,7 +109,7 @@ void encoder_state_raw(uint8_t* slave_state) { memcpy(slave_state, &encoder_valu
void encoder_update_raw(uint8_t* slave_state) {
for (uint8_t i = 0; i < NUMBER_OF_ENCODERS; i++) {
uint8_t index = i + thatHand;
- int8_t delta = slave_state[i] - encoder_value[index];
+ int8_t delta = slave_state[i] - encoder_value[index];
while (delta > 0) {
delta--;
encoder_value[index]++;