From a0fed0ea176d1c986e40fc4981b900509c90d66e Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 21 May 2021 23:17:32 -0700 Subject: Convert Encoder callbacks to be boolean functions (#12805) Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> --- keyboards/cassette42/keymaps/default/keymap.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'keyboards/cassette42/keymaps') diff --git a/keyboards/cassette42/keymaps/default/keymap.c b/keyboards/cassette42/keymaps/default/keymap.c index 2f53c1d6ca..4dc46d74e9 100644 --- a/keyboards/cassette42/keymaps/default/keymap.c +++ b/keyboards/cassette42/keymaps/default/keymap.c @@ -33,10 +33,10 @@ enum layer_number { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // LAYOUT(LeftEncoder, RightEncoder, LeftSwitch, CenterLeftSwitch, CenterRightSwitch, RightSwitch) - [_AUDIO] = LAYOUT(KC_MUTE, KC_ENT, LT(_HUE, KC_MPRV), LT(_SAT, KC_MPLY), LT(_VAL, KC_MNXT), LT(_MODE, KC_SPC)), - [_HUE] = LAYOUT(RGB_TOG, RGBRST, _______, _______, RGB_HUD, RGB_HUI), - [_SAT] = LAYOUT(_______, _______, _______, _______, RGB_SAD, RGB_SAI), - [_VAL] = LAYOUT(_______, _______, RGB_VAD, RGB_VAI, _______, RGB_VAI), + [_AUDIO] = LAYOUT(KC_MUTE, KC_ENT, LT(_HUE, KC_MPRV), LT(_SAT, KC_MPLY), LT(_VAL, KC_MNXT), LT(_MODE, KC_SPC)), + [_HUE] = LAYOUT(RGB_TOG, RGBRST, _______, _______, RGB_HUD, RGB_HUI), + [_SAT] = LAYOUT(_______, _______, _______, _______, RGB_SAD, RGB_SAI), + [_VAL] = LAYOUT(_______, _______, RGB_VAD, RGB_VAI, _______, RGB_VAI), [_MODE] = LAYOUT(_______, WRTROM, RGB_RMOD, RGB_MOD, RGB_MOD, _______), }; @@ -112,7 +112,7 @@ void oled_task_user(void) { void led_set_user(uint8_t usb_led) {} -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { oled_on(); if (index == 0) { /* left encoder */ switch (layer_state) { @@ -171,4 +171,5 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_UP); } } + return true; } -- cgit v1.2.3