summaryrefslogtreecommitdiff
path: root/keyboards/yandrstudio
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2023-04-03 10:33:45 +0200
committerGitHub <noreply@github.com>2023-04-03 18:33:45 +1000
commitfcf8b804ed95a98561bd4c1d6c85604be0f7cc7b (patch)
tree6b6917d99ced027d614e7b461e1cd1939833a9cd /keyboards/yandrstudio
parent2d9140af53e4e5bbc5cd50a2b6f3eda20ed8f71e (diff)
[Core] Refactor `keyevent_t` for 1ms timing resolution (#15847)
Diffstat (limited to 'keyboards/yandrstudio')
-rw-r--r--keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c b/keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c
index 3da37b5315..ed5075636a 100644
--- a/keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c
+++ b/keyboards/yandrstudio/nz67v2/keymaps/via/keymap.c
@@ -43,20 +43,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
#ifdef ENCODER_ENABLE
-keyevent_t encoder1_ccw = {.key = (keypos_t){.row = 4, .col = 4}, .pressed = false};
+keyevent_t encoder1_ccw = {.key = (keypos_t){.row = 4, .col = 4}, .pressed = false, .type = KEY_EVENT};
-keyevent_t encoder1_cw = {.key = (keypos_t){.row = 4, .col = 6}, .pressed = false};
+keyevent_t encoder1_cw = {.key = (keypos_t){.row = 4, .col = 6}, .pressed = false, .type = KEY_EVENT};
void matrix_scan_user(void) {
if (IS_PRESSED(encoder1_ccw)) {
encoder1_ccw.pressed = false;
- encoder1_ccw.time = (timer_read() | 1);
+ encoder1_ccw.time = timer_read();
action_exec(encoder1_ccw);
}
if (IS_PRESSED(encoder1_cw)) {
encoder1_cw.pressed = false;
- encoder1_cw.time = (timer_read() | 1);
+ encoder1_cw.time = timer_read();
action_exec(encoder1_cw);
}
}
@@ -64,11 +64,11 @@ void matrix_scan_user(void) {
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
encoder1_cw.pressed = true;
- encoder1_cw.time = (timer_read() | 1);
+ encoder1_cw.time = timer_read();
action_exec(encoder1_cw);
} else {
encoder1_ccw.pressed = true;
- encoder1_ccw.time = (timer_read() | 1);
+ encoder1_ccw.time = timer_read();
action_exec(encoder1_ccw);
}
return true;