increase hue step, and make option for encoder usage

This commit is contained in:
Sadek Baroudi 2021-08-27 01:00:16 -07:00
parent 0dcf43becf
commit a0d2641292
2 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@
# ifdef RGBLIGHT_VAL_STEP
# undef RGBLIGHT_VAL_STEP
# endif
# define RGBLIGHT_HUE_STEP 2
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
# define RGBLIGHT_SLEEP

View File

@ -11,13 +11,13 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
// Volume control
if (clockwise) {
#ifdef RGBLIGHT_ENABLE
#if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB)
rgblight_increase_hue();
#else
tap_code(KC_VOLU);
#endif
} else {
#ifdef RGBLIGHT_ENABLE
#if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB)
rgblight_decrease_hue();
#else
tap_code(KC_VOLD);
@ -30,20 +30,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
}
else if (index == 1) {
if(clockwise) {
#ifdef RGBLIGHT_ENABLE
#if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB)
rgblight_step();
#else
tap_code16(C(KC_RGHT));
#endif
}
else{
#ifdef RGBLIGHT_ENABLE
#if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB)
rgblight_step_reverse();
#else
tap_code16(C(KC_LEFT));
#endif
}
#ifdef RGBLIGHT_ENABLE
#if defined(RGBLIGHT_ENABLE) && defined(ENCODERS_FOR_RGB)
rgb_set_user_config_from_current_values();
#endif
}