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/hadron/ver3/ver3.c | |
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/hadron/ver3/ver3.c')
-rw-r--r-- | keyboards/hadron/ver3/ver3.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c index 1491caba4..0664bf4b0 100644 --- a/keyboards/hadron/ver3/ver3.c +++ b/keyboards/hadron/ver3/ver3.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "action_layer.h" | 18 | #include "action_layer.h" |
19 | #include "haptic.h" | 19 | #include "haptic.h" |
20 | 20 | ||
21 | |||
21 | #ifdef RGB_MATRIX_ENABLE | 22 | #ifdef RGB_MATRIX_ENABLE |
22 | #include "rgb_matrix.h" | 23 | #include "rgb_matrix.h" |
23 | 24 | ||
@@ -181,9 +182,13 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
181 | return process_record_user(keycode, record); | 182 | return process_record_user(keycode, record); |
182 | } | 183 | } |
183 | 184 | ||
184 | void encoder_update_kb(uint8_t index, bool clockwise) { | 185 | bool encoder_update_user(uint8_t index, bool clockwise); |
186 | |||
187 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
188 | if (!encoder_update_user(index, clockwise)) return false; | ||
185 | encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; | 189 | encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; |
186 | queue_for_send = true; | 190 | queue_for_send = true; |
191 | return true; | ||
187 | } | 192 | } |
188 | 193 | ||
189 | #endif | 194 | #endif |