Skip to content

Commit

Permalink
Merge pull request qmk#112 from lalalademaxiya1/playground
Browse files Browse the repository at this point in the history
Update v8 ansi_encoder info.json file
  • Loading branch information
KeychronMacro authored Mar 22, 2023
2 parents 2badc3c + 6050049 commit 1fd6186
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
4 changes: 2 additions & 2 deletions keyboards/keychron/v8/ansi_encoder/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"usb": {
"vid": "0x3434",
"pid": "0x0381",
"device_version": "1.0.1"
"device_version": "1.0.2"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
Expand All @@ -15,7 +15,7 @@
"diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
{"pin_a": "B5", "pin_b": "A10"}
]
},
"processor": "STM32L432",
Expand Down
5 changes: 3 additions & 2 deletions keyboards/keychron/v8/iso_encoder/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
"usb": {
"vid": "0x3434",
"pid": "0x0383",
"device_version": "1.0.1"
"device_version": "1.0.2"
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"],
"rows": ["B4", "B3", "A15", "A14", "A13"]
},
"diode_direction": "ROW2COL",
"encoder": {
"rotary": [
{"pin_a": "A10", "pin_b": "B5"}
{"pin_a": "B5", "pin_b": "A10"}
]
},
"processor": "STM32L432",
Expand Down
9 changes: 0 additions & 9 deletions quantum/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,3 @@ void encoder_update_raw(uint8_t *slave_state) {
if (changed) last_encoder_activity_trigger();
}
#endif

void encoder_insert_state(void) {
for (uint8_t i = 0; i < thisCount; i++) {
encoder_state[i] <<= 2;
encoder_state[i] |= (readPin(encoders_pad_a[i]) << 0) | (readPin(encoders_pad_b[i]) << 1);
encoder_pulses[i] += encoder_LUT[encoder_state[i] & 0xF];
encoder_external_update[i] = true;
}
}

0 comments on commit 1fd6186

Please sign in to comment.