From 09df2a09f5b70442995d74e136c0712445119146 Mon Sep 17 00:00:00 2001 From: Aashrey Sharma Date: Wed, 14 Jul 2021 09:08:46 -0400 Subject: [PATCH] Fixed build errors in Tidbit firmware due to mismatched return type in keymaps (#9) * Fixed encoder_update return type mismatch in VIA keymap * Fixed encoder_update return type mismatch in OLED keycap * Fixed encoder_update return type mismatch in DEFAULT keycap * Fixed encoder_update return type mismatch in 4ROTARY keymap * Fixed encoder_update return type mismatch in 19KEYPAD keymap --- keymaps/19keypad/keymap.c | 5 +++-- keymaps/4rotary/keymap.c | 3 ++- keymaps/default/keymap.c | 7 ++++--- keymaps/oled/keymap.c | 7 ++++--- keymaps/via/keymap.c | 7 ++++--- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/keymaps/19keypad/keymap.c b/keymaps/19keypad/keymap.c index 4cba258..f50c64e 100644 --- a/keymaps/19keypad/keymap.c +++ b/keymaps/19keypad/keymap.c @@ -72,12 +72,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); } + return true; } layer_state_t layer_state_set_user(layer_state_t state) { @@ -97,4 +98,4 @@ void led_set_kb(uint8_t usb_led) { set_bitc_LED(LED_ON); else set_bitc_LED(LED_DIM); -} \ No newline at end of file +} diff --git a/keymaps/4rotary/keymap.c b/keymaps/4rotary/keymap.c index feff286..ed1f219 100644 --- a/keymaps/4rotary/keymap.c +++ b/keymaps/4rotary/keymap.c @@ -87,7 +87,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { /* With an if statement we can check which encoder was turned. */ if (index == 0) { /* First encoder */ if (clockwise) { @@ -114,6 +114,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_VOLD); } } + return true; } layer_state_t layer_state_set_user(layer_state_t state) { diff --git a/keymaps/default/keymap.c b/keymaps/default/keymap.c index 239df7a..372b9bb 100644 --- a/keymaps/default/keymap.c +++ b/keymaps/default/keymap.c @@ -82,12 +82,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); - } + } + return true; } layer_state_t layer_state_set_user(layer_state_t state) { @@ -107,4 +108,4 @@ void led_set_kb(uint8_t usb_led) { set_bitc_LED(LED_DIM); else set_bitc_LED(LED_OFF); -} \ No newline at end of file +} diff --git a/keymaps/oled/keymap.c b/keymaps/oled/keymap.c index b5eab63..3b84742 100644 --- a/keymaps/oled/keymap.c +++ b/keymaps/oled/keymap.c @@ -129,12 +129,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); - } + } + return true; } layer_state_t layer_state_set_user(layer_state_t state) { @@ -154,4 +155,4 @@ void led_set_kb(uint8_t usb_led) { set_bitc_LED(LED_DIM); else set_bitc_LED(LED_OFF); -} \ No newline at end of file +} diff --git a/keymaps/via/keymap.c b/keymaps/via/keymap.c index e2ed036..709d10a 100644 --- a/keymaps/via/keymap.c +++ b/keymaps/via/keymap.c @@ -71,12 +71,13 @@ void matrix_scan_user(void) { matrix_scan_remote_kb(); } -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); - } + } + return true; } void led_set_kb(uint8_t usb_led) { @@ -84,4 +85,4 @@ void led_set_kb(uint8_t usb_led) { set_bitc_LED(LED_DIM); else set_bitc_LED(LED_OFF); -} \ No newline at end of file +}