diff options
| author | Xelus22 <17491233+Xelus22@users.noreply.github.com> | 2021-06-29 13:30:39 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-28 20:30:39 -0700 |
| commit | de8939aa5efb1dea9c048c3254b0462f6e21e822 (patch) | |
| tree | b1e91d35882a6fa8e236456c8cf914e2b34413aa | |
| parent | 2b2e8bfdb7091cdc0587f7445df84d2414fa7207 (diff) | |
| download | qmk_firmware-de8939aa5efb1dea9c048c3254b0462f6e21e822.tar.gz qmk_firmware-de8939aa5efb1dea9c048c3254b0462f6e21e822.zip | |
[Keyboard] fix encoder void to bool (#13334)
4 files changed, 8 insertions, 4 deletions
diff --git a/keyboards/ramonimbao/squishytkl/keymaps/default/keymap.c b/keyboards/ramonimbao/squishytkl/keymaps/default/keymap.c index c55c4aed6..4abf503dd 100644 --- a/keyboards/ramonimbao/squishytkl/keymaps/default/keymap.c +++ b/keyboards/ramonimbao/squishytkl/keymaps/default/keymap.c | |||
| @@ -26,10 +26,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 26 | ) | 26 | ) |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | void encoder_update_user(uint8_t index, bool clockwise) { | 29 | bool encoder_update_user(uint8_t index, bool clockwise) { |
| 30 | if (clockwise) { | 30 | if (clockwise) { |
| 31 | tap_code(KC_VOLU); | 31 | tap_code(KC_VOLU); |
| 32 | } else { | 32 | } else { |
| 33 | tap_code(KC_VOLD); | 33 | tap_code(KC_VOLD); |
| 34 | } | 34 | } |
| 35 | return true; | ||
| 35 | } | 36 | } |
diff --git a/keyboards/ramonimbao/squishytkl/keymaps/iso/keymap.c b/keyboards/ramonimbao/squishytkl/keymaps/iso/keymap.c index 4caf9e8b5..cfa6240f5 100644 --- a/keyboards/ramonimbao/squishytkl/keymaps/iso/keymap.c +++ b/keyboards/ramonimbao/squishytkl/keymaps/iso/keymap.c | |||
| @@ -26,10 +26,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 26 | ) | 26 | ) |
| 27 | }; | 27 | }; |
| 28 | 28 | ||
| 29 | void encoder_update_user(uint8_t index, bool clockwise) { | 29 | bool encoder_update_user(uint8_t index, bool clockwise) { |
| 30 | if (clockwise) { | 30 | if (clockwise) { |
| 31 | tap_code(KC_VOLU); | 31 | tap_code(KC_VOLU); |
| 32 | } else { | 32 | } else { |
| 33 | tap_code(KC_VOLD); | 33 | tap_code(KC_VOLD); |
| 34 | } | 34 | } |
| 35 | return true; | ||
| 35 | } | 36 | } |
diff --git a/keyboards/ramonimbao/squishytkl/keymaps/jis/keymap.c b/keyboards/ramonimbao/squishytkl/keymaps/jis/keymap.c index dc0d1d5ba..d8debc9cc 100644 --- a/keyboards/ramonimbao/squishytkl/keymaps/jis/keymap.c +++ b/keyboards/ramonimbao/squishytkl/keymaps/jis/keymap.c | |||
| @@ -28,10 +28,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 28 | ) | 28 | ) |
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | void encoder_update_user(uint8_t index, bool clockwise) { | 31 | bool encoder_update_user(uint8_t index, bool clockwise) { |
| 32 | if (clockwise) { | 32 | if (clockwise) { |
| 33 | tap_code(KC_VOLU); | 33 | tap_code(KC_VOLU); |
| 34 | } else { | 34 | } else { |
| 35 | tap_code(KC_VOLD); | 35 | tap_code(KC_VOLD); |
| 36 | } | 36 | } |
| 37 | return true; | ||
| 37 | } | 38 | } |
diff --git a/keyboards/ramonimbao/squishytkl/keymaps/via/keymap.c b/keyboards/ramonimbao/squishytkl/keymaps/via/keymap.c index fa7214149..f671d45c5 100644 --- a/keyboards/ramonimbao/squishytkl/keymaps/via/keymap.c +++ b/keyboards/ramonimbao/squishytkl/keymaps/via/keymap.c | |||
| @@ -51,7 +51,7 @@ void matrix_scan_user(void) { | |||
| 51 | } | 51 | } |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | void encoder_update_user(uint8_t index, bool clockwise) { | 54 | bool encoder_update_user(uint8_t index, bool clockwise) { |
| 55 | if (clockwise) { | 55 | if (clockwise) { |
| 56 | encoder_cw.pressed = true; | 56 | encoder_cw.pressed = true; |
| 57 | encoder_cw.time = (timer_read() | 1); | 57 | encoder_cw.time = (timer_read() | 1); |
| @@ -61,4 +61,5 @@ void encoder_update_user(uint8_t index, bool clockwise) { | |||
| 61 | encoder_ccw.time = (timer_read() | 1); | 61 | encoder_ccw.time = (timer_read() | 1); |
| 62 | action_exec(encoder_ccw); | 62 | action_exec(encoder_ccw); |
| 63 | } | 63 | } |
| 64 | return true; | ||
| 64 | } | 65 | } |
