Convert Encoder callbacks to be boolean functions (#12805)
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
This commit is contained in:
@@ -54,7 +54,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) {
|
||||
if (index == 0) { // Left encoder
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
@@ -69,4 +69,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
rgblight_increase_hue_noeeprom();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -114,7 +114,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) {
|
||||
if (index == 0) { // Left encoder
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
@@ -129,6 +129,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
rgblight_increase_hue_noeeprom();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const rgblight_segment_t PROGMEM quick7_capslock[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
@@ -154,4 +155,4 @@ bool led_update_user(led_t led_state){
|
||||
rgblight_set_layer_state(0, led_state.caps_lock);
|
||||
rgblight_set_layer_state(1, led_state.num_lock);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -66,7 +66,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) {
|
||||
if (index == 0) { // Left encoder
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
@@ -81,4 +81,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
rgblight_increase_hue_noeeprom();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user