summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-07-11 13:29:19 -0500
committerDrashna Jaelre <drashna@live.com>2019-07-11 11:29:19 -0700
commit3ee062222acc40683246585fe21e3d5fe00dce0b (patch)
tree3651e9fde25891746678bf4e9b22bc3da93e6a65 /quantum
parent3dd2905b7bea4f1f0ebfd36c753ff760767f54b5 (diff)
Fixing effects to respect user sat and val levels (#6275)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h2
-rw-r--r--quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h2
-rw-r--r--quantum/rgb_matrix_animations/colorband_sat_anim.h2
-rw-r--r--quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h2
-rw-r--r--quantum/rgb_matrix_animations/colorband_spiral_val_anim.h2
-rw-r--r--quantum/rgb_matrix_animations/colorband_val_anim.h2
6 files changed, 6 insertions, 6 deletions
diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h
index cf9c0784a8..3739cde1f6 100644
--- a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h
+++ b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h
@@ -3,7 +3,7 @@ RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static void BAND_PINWHEEL_SAT_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) {
- hsv->s = rgb_matrix_config.sat - time - atan2_8(dy, dx) * 3;
+ hsv->s = scale8(rgb_matrix_config.sat - time - atan2_8(dy, dx) * 3, rgb_matrix_config.sat);
}
bool BAND_PINWHEEL_SAT(effect_params_t* params) {
diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h
index 05ad0ee323..6e5871d7ec 100644
--- a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h
+++ b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h
@@ -3,7 +3,7 @@ RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static void BAND_PINWHEEL_VAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) {
- hsv->v = rgb_matrix_config.val - time - atan2_8(dy, dx) * 3;
+ hsv->v = scale8(rgb_matrix_config.val - time - atan2_8(dy, dx) * 3, rgb_matrix_config.val);
}
bool BAND_PINWHEEL_VAL(effect_params_t* params) {
diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix_animations/colorband_sat_anim.h
index 8a40473e4a..bfa1085cb1 100644
--- a/quantum/rgb_matrix_animations/colorband_sat_anim.h
+++ b/quantum/rgb_matrix_animations/colorband_sat_anim.h
@@ -4,7 +4,7 @@ RGB_MATRIX_EFFECT(BAND_SAT)
static void BAND_SAT_math(HSV* hsv, uint8_t i, uint8_t time) {
int16_t s = rgb_matrix_config.sat - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
- hsv->s = s < 0 ? 0 : s;
+ hsv->s = scale8(s < 0 ? 0 : s, rgb_matrix_config.sat);
}
bool BAND_SAT(effect_params_t* params) {
diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h
index 4af6c60b0d..7db01c5f9e 100644
--- a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h
+++ b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h
@@ -3,7 +3,7 @@ RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static void BAND_SPIRAL_SAT_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
- hsv->s = rgb_matrix_config.sat + dist - time - atan2_8(dy, dx);
+ hsv->s = scale8(rgb_matrix_config.sat + dist - time - atan2_8(dy, dx), rgb_matrix_config.sat);
}
bool BAND_SPIRAL_SAT(effect_params_t* params) {
diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h
index e787956a7a..a16f8e2cea 100644
--- a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h
+++ b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h
@@ -3,7 +3,7 @@ RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL)
#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
static void BAND_SPIRAL_VAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) {
- hsv->v = rgb_matrix_config.val + dist - time - atan2_8(dy, dx);
+ hsv->v = scale8(rgb_matrix_config.val + dist - time - atan2_8(dy, dx), rgb_matrix_config.val);
}
bool BAND_SPIRAL_VAL(effect_params_t* params) {
diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix_animations/colorband_val_anim.h
index 1e3740cea4..4b76924db9 100644
--- a/quantum/rgb_matrix_animations/colorband_val_anim.h
+++ b/quantum/rgb_matrix_animations/colorband_val_anim.h
@@ -4,7 +4,7 @@ RGB_MATRIX_EFFECT(BAND_VAL)
static void BAND_VAL_math(HSV* hsv, uint8_t i, uint8_t time) {
int16_t v = rgb_matrix_config.val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8;
- hsv->v = v < 0 ? 0 : v;
+ hsv->v = scale8(v < 0 ? 0 : v, rgb_matrix_config.val);
}
bool BAND_VAL(effect_params_t* params) {