diff options
| author | Drashna Jaelre <drashna@live.com> | 2021-05-21 23:17:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-21 23:17:32 -0700 |
| commit | a0fed0ea176d1c986e40fc4981b900509c90d66e (patch) | |
| tree | ee12f5943046015ea0dce8e2a30a68bc8eb99dbe /keyboards/montsinger | |
| parent | 76c23b15abc824f867b48d8d5100dced2417d336 (diff) | |
| download | qmk_firmware-a0fed0ea176d1c986e40fc4981b900509c90d66e.tar.gz qmk_firmware-a0fed0ea176d1c986e40fc4981b900509c90d66e.zip | |
Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Diffstat (limited to 'keyboards/montsinger')
5 files changed, 10 insertions, 6 deletions
diff --git a/keyboards/montsinger/rebound/rev3/keymaps/default/keymap.c b/keyboards/montsinger/rebound/rev3/keymaps/default/keymap.c index be038b1f5..1dd4bec95 100644 --- a/keyboards/montsinger/rebound/rev3/keymaps/default/keymap.c +++ b/keyboards/montsinger/rebound/rev3/keymaps/default/keymap.c | |||
| @@ -93,10 +93,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 93 | return true; | 93 | return true; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | void encoder_update_user(uint8_t index, bool clockwise) { | 96 | bool encoder_update_user(uint8_t index, bool clockwise) { |
| 97 | if (clockwise) { | 97 | if (clockwise) { |
| 98 | tap_code16(S(KC_VOLD)); | 98 | tap_code16(S(KC_VOLD)); |
| 99 | } else { | 99 | } else { |
| 100 | tap_code16(KC_VOLU); | 100 | tap_code16(KC_VOLU); |
| 101 | } | 101 | } |
| 102 | return true; | ||
| 102 | } | 103 | } |
diff --git a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c index ee15a6062..ab2b52a72 100644 --- a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c +++ b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c | |||
| @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 54 | ) | 54 | ) |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | void encoder_update_user(uint8_t index, bool clockwise) { | 57 | bool encoder_update_user(uint8_t index, bool clockwise) { |
| 58 | switch(get_highest_layer(layer_state)){ | 58 | switch(get_highest_layer(layer_state)){ |
| 59 | case _BASE: | 59 | case _BASE: |
| 60 | if (clockwise) { | 60 | if (clockwise) { |
| @@ -71,6 +71,7 @@ case _BASE: | |||
| 71 | } | 71 | } |
| 72 | break; | 72 | break; |
| 73 | } | 73 | } |
| 74 | return true; | ||
| 74 | } | 75 | } |
| 75 | 76 | ||
| 76 | #ifdef OLED_DRIVER_ENABLE | 77 | #ifdef OLED_DRIVER_ENABLE |
| @@ -109,4 +110,3 @@ void oled_task_user(void) { | |||
| 109 | } | 110 | } |
| 110 | 111 | ||
| 111 | #endif | 112 | #endif |
| 112 | |||
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c index be038b1f5..1dd4bec95 100644 --- a/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c +++ b/keyboards/montsinger/rebound/rev4/keymaps/default/keymap.c | |||
| @@ -93,10 +93,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 93 | return true; | 93 | return true; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | void encoder_update_user(uint8_t index, bool clockwise) { | 96 | bool encoder_update_user(uint8_t index, bool clockwise) { |
| 97 | if (clockwise) { | 97 | if (clockwise) { |
| 98 | tap_code16(S(KC_VOLD)); | 98 | tap_code16(S(KC_VOLD)); |
| 99 | } else { | 99 | } else { |
| 100 | tap_code16(KC_VOLU); | 100 | tap_code16(KC_VOLU); |
| 101 | } | 101 | } |
| 102 | return true; | ||
| 102 | } | 103 | } |
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c index a0c3ab639..b6f5dc7dd 100644 --- a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c +++ b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c | |||
| @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 55 | ) | 55 | ) |
| 56 | }; | 56 | }; |
| 57 | 57 | ||
| 58 | void encoder_update_user(uint8_t index, bool clockwise) { | 58 | bool encoder_update_user(uint8_t index, bool clockwise) { |
| 59 | switch(get_highest_layer(layer_state)){ | 59 | switch(get_highest_layer(layer_state)){ |
| 60 | case _BASE: | 60 | case _BASE: |
| 61 | if (clockwise) { | 61 | if (clockwise) { |
| @@ -80,6 +80,7 @@ case _DEL: | |||
| 80 | } | 80 | } |
| 81 | break; | 81 | break; |
| 82 | } | 82 | } |
| 83 | return true; | ||
| 83 | } | 84 | } |
| 84 | 85 | ||
| 85 | #ifdef OLED_DRIVER_ENABLE | 86 | #ifdef OLED_DRIVER_ENABLE |
diff --git a/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c index 325036231..85eb73cc5 100644 --- a/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c +++ b/keyboards/montsinger/rebound/rev4/keymaps/via/keymap.c | |||
| @@ -109,10 +109,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 109 | return true; | 109 | return true; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | void encoder_update_user(uint8_t index, bool clockwise) { | 112 | bool encoder_update_user(uint8_t index, bool clockwise) { |
| 113 | if (clockwise) { | 113 | if (clockwise) { |
| 114 | tap_code16(S(KC_VOLD)); | 114 | tap_code16(S(KC_VOLD)); |
| 115 | } else { | 115 | } else { |
| 116 | tap_code16(KC_VOLU); | 116 | tap_code16(KC_VOLU); |
| 117 | } | 117 | } |
| 118 | return true; | ||
| 118 | } | 119 | } |
