diff options
author | James Young <18669334+noroadsleft@users.noreply.github.com> | 2021-05-29 13:53:10 -0700 |
---|---|---|
committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2021-05-29 13:53:10 -0700 |
commit | 7d1194de01ea94f065bd5176607b4d66279ef51b (patch) | |
tree | 337ab0498a929285a234518fee34a4d9dcf51656 /quantum | |
parent | e628051505cca7674c37b417ba91af1c69dbbd86 (diff) | |
download | qmk_firmware-7d1194de01ea94f065bd5176607b4d66279ef51b.tar.gz qmk_firmware-7d1194de01ea94f065bd5176607b4d66279ef51b.zip |
run: qmk cformat --core-only
Diffstat (limited to 'quantum')
21 files changed, 78 insertions, 134 deletions
diff --git a/quantum/led_matrix_animations/alpha_mods_anim.h b/quantum/led_matrix_animations/alpha_mods_anim.h index a4638fde6..6f69f6892 100644 --- a/quantum/led_matrix_animations/alpha_mods_anim.h +++ b/quantum/led_matrix_animations/alpha_mods_anim.h | |||
@@ -21,4 +21,4 @@ bool ALPHAS_MODS(effect_params_t* params) { | |||
21 | } | 21 | } |
22 | 22 | ||
23 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 23 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
24 | #endif // DISABLE_LED_MATRIX_ALPHAS_MODS | 24 | #endif // DISABLE_LED_MATRIX_ALPHAS_MODS |
diff --git a/quantum/led_matrix_animations/band_anim.h b/quantum/led_matrix_animations/band_anim.h index 4a2b746a7..523dba1b7 100644 --- a/quantum/led_matrix_animations/band_anim.h +++ b/quantum/led_matrix_animations/band_anim.h | |||
@@ -7,9 +7,7 @@ static uint8_t BAND_math(uint8_t val, uint8_t i, uint8_t time) { | |||
7 | return scale8(v < 0 ? 0 : v, val); | 7 | return scale8(v < 0 ? 0 : v, val); |
8 | } | 8 | } |
9 | 9 | ||
10 | bool BAND(effect_params_t* params) { | 10 | bool BAND(effect_params_t* params) { return effect_runner_i(params, &BAND_math); } |
11 | return effect_runner_i(params, &BAND_math); | ||
12 | } | ||
13 | 11 | ||
14 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 12 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
15 | #endif // DISABLE_LED_MATRIX_BAND | 13 | #endif // DISABLE_LED_MATRIX_BAND |
diff --git a/quantum/led_matrix_animations/band_pinwheel_anim.h b/quantum/led_matrix_animations/band_pinwheel_anim.h index 9836320d2..fb3b835ca 100644 --- a/quantum/led_matrix_animations/band_pinwheel_anim.h +++ b/quantum/led_matrix_animations/band_pinwheel_anim.h | |||
@@ -2,13 +2,9 @@ | |||
2 | LED_MATRIX_EFFECT(BAND_PINWHEEL) | 2 | LED_MATRIX_EFFECT(BAND_PINWHEEL) |
3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | 3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS |
4 | 4 | ||
5 | static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) { | 5 | static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) { return scale8(val - time - atan2_8(dy, dx) * 3, val); } |
6 | return scale8(val - time - atan2_8(dy, dx) * 3, val); | ||
7 | } | ||
8 | 6 | ||
9 | bool BAND_PINWHEEL(effect_params_t* params) { | 7 | bool BAND_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); } |
10 | return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); | ||
11 | } | ||
12 | 8 | ||
13 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 9 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
14 | #endif // DISABLE_LED_MATRIX_BAND_PINWHEEL | 10 | #endif // DISABLE_LED_MATRIX_BAND_PINWHEEL |
diff --git a/quantum/led_matrix_animations/band_spiral_anim.h b/quantum/led_matrix_animations/band_spiral_anim.h index be17c03aa..fca22aad9 100644 --- a/quantum/led_matrix_animations/band_spiral_anim.h +++ b/quantum/led_matrix_animations/band_spiral_anim.h | |||
@@ -2,13 +2,9 @@ | |||
2 | LED_MATRIX_EFFECT(BAND_SPIRAL) | 2 | LED_MATRIX_EFFECT(BAND_SPIRAL) |
3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | 3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS |
4 | 4 | ||
5 | static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { | 5 | static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(val + dist - time - atan2_8(dy, dx), val); } |
6 | return scale8(val + dist - time - atan2_8(dy, dx), val); | ||
7 | } | ||
8 | 6 | ||
9 | bool BAND_SPIRAL(effect_params_t* params) { | 7 | bool BAND_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); } |
10 | return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); | ||
11 | } | ||
12 | 8 | ||
13 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 9 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
14 | #endif // DISABLE_LED_MATRIX_BAND_SPIRAL | 10 | #endif // DISABLE_LED_MATRIX_BAND_SPIRAL |
diff --git a/quantum/led_matrix_animations/breathing_anim.h b/quantum/led_matrix_animations/breathing_anim.h index 4f49f5069..00310e3f6 100644 --- a/quantum/led_matrix_animations/breathing_anim.h +++ b/quantum/led_matrix_animations/breathing_anim.h | |||
@@ -16,4 +16,4 @@ bool BREATHING(effect_params_t* params) { | |||
16 | } | 16 | } |
17 | 17 | ||
18 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 18 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
19 | #endif // DISABLE_LED_MATRIX_BREATHING | 19 | #endif // DISABLE_LED_MATRIX_BREATHING |
diff --git a/quantum/led_matrix_animations/cycle_left_right_anim.h b/quantum/led_matrix_animations/cycle_left_right_anim.h index 404fda26f..51e81d57c 100644 --- a/quantum/led_matrix_animations/cycle_left_right_anim.h +++ b/quantum/led_matrix_animations/cycle_left_right_anim.h | |||
@@ -2,13 +2,9 @@ | |||
2 | LED_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) | 2 | LED_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) |
3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | 3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS |
4 | 4 | ||
5 | static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { | 5 | static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].x - time, val); } |
6 | return scale8(g_led_config.point[i].x - time, val); | ||
7 | } | ||
8 | 6 | ||
9 | bool CYCLE_LEFT_RIGHT(effect_params_t* params) { | 7 | bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); } |
10 | return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); | ||
11 | } | ||
12 | 8 | ||
13 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 9 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
14 | #endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT | 10 | #endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT |
diff --git a/quantum/led_matrix_animations/cycle_out_in_anim.h b/quantum/led_matrix_animations/cycle_out_in_anim.h index 3f5fc5b18..f62061552 100644 --- a/quantum/led_matrix_animations/cycle_out_in_anim.h +++ b/quantum/led_matrix_animations/cycle_out_in_anim.h | |||
@@ -2,13 +2,9 @@ | |||
2 | LED_MATRIX_EFFECT(CYCLE_OUT_IN) | 2 | LED_MATRIX_EFFECT(CYCLE_OUT_IN) |
3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | 3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS |
4 | 4 | ||
5 | static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { | 5 | static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(3 * dist / 2 + time, val); } |
6 | return scale8(3 * dist / 2 + time, val); | ||
7 | } | ||
8 | 6 | ||
9 | bool CYCLE_OUT_IN(effect_params_t* params) { | 7 | bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); } |
10 | return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); | ||
11 | } | ||
12 | 8 | ||
13 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 9 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
14 | #endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN | 10 | #endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN |
diff --git a/quantum/led_matrix_animations/cycle_up_down_anim.h b/quantum/led_matrix_animations/cycle_up_down_anim.h index 25fc211b1..bd1d12567 100644 --- a/quantum/led_matrix_animations/cycle_up_down_anim.h +++ b/quantum/led_matrix_animations/cycle_up_down_anim.h | |||
@@ -2,13 +2,9 @@ | |||
2 | LED_MATRIX_EFFECT(CYCLE_UP_DOWN) | 2 | LED_MATRIX_EFFECT(CYCLE_UP_DOWN) |
3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | 3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS |
4 | 4 | ||
5 | static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { | 5 | static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].y - time, val); } |
6 | return scale8(g_led_config.point[i].y - time, val); | ||
7 | } | ||
8 | 6 | ||
9 | bool CYCLE_UP_DOWN(effect_params_t* params) { | 7 | bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); } |
10 | return effect_runner_i(params, &CYCLE_UP_DOWN_math); | ||
11 | } | ||
12 | 8 | ||
13 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 9 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
14 | #endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN | 10 | #endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN |
diff --git a/quantum/led_matrix_animations/dual_beacon_anim.h b/quantum/led_matrix_animations/dual_beacon_anim.h index 1fa1df139..9b8a7877c 100644 --- a/quantum/led_matrix_animations/dual_beacon_anim.h +++ b/quantum/led_matrix_animations/dual_beacon_anim.h | |||
@@ -2,13 +2,9 @@ | |||
2 | LED_MATRIX_EFFECT(DUAL_BEACON) | 2 | LED_MATRIX_EFFECT(DUAL_BEACON) |
3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | 3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS |
4 | 4 | ||
5 | static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { | 5 | static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val); } |
6 | return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val); | ||
7 | } | ||
8 | 6 | ||
9 | bool DUAL_BEACON(effect_params_t* params) { | 7 | bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); } |
10 | return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); | ||
11 | } | ||
12 | 8 | ||
13 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 9 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
14 | #endif // DISABLE_LED_MATRIX_DUAL_BEACON | 10 | #endif // DISABLE_LED_MATRIX_DUAL_BEACON |
diff --git a/quantum/led_matrix_animations/solid_reactive_cross.h b/quantum/led_matrix_animations/solid_reactive_cross.h index a50d1fc62..f402d99b3 100644 --- a/quantum/led_matrix_animations/solid_reactive_cross.h +++ b/quantum/led_matrix_animations/solid_reactive_cross.h | |||
@@ -23,17 +23,13 @@ static uint8_t SOLID_REACTIVE_CROSS_math(uint8_t val, int16_t dx, int16_t dy, ui | |||
23 | } | 23 | } |
24 | 24 | ||
25 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS | 25 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS |
26 | bool SOLID_REACTIVE_CROSS(effect_params_t* params) { | 26 | bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); } |
27 | return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); | ||
28 | } | ||
29 | # endif | 27 | # endif |
30 | 28 | ||
31 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS | 29 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS |
32 | bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { | 30 | bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); } |
33 | return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); | ||
34 | } | ||
35 | # endif | 31 | # endif |
36 | 32 | ||
37 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 33 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
38 | # endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS) | 34 | # endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS) |
39 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED | 35 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED |
diff --git a/quantum/led_matrix_animations/solid_reactive_nexus.h b/quantum/led_matrix_animations/solid_reactive_nexus.h index 4638aac5a..4d0d25226 100644 --- a/quantum/led_matrix_animations/solid_reactive_nexus.h +++ b/quantum/led_matrix_animations/solid_reactive_nexus.h | |||
@@ -20,17 +20,13 @@ static uint8_t SOLID_REACTIVE_NEXUS_math(uint8_t val, int16_t dx, int16_t dy, ui | |||
20 | } | 20 | } |
21 | 21 | ||
22 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS | 22 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS |
23 | bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { | 23 | bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); } |
24 | return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); | ||
25 | } | ||
26 | # endif | 24 | # endif |
27 | 25 | ||
28 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS | 26 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS |
29 | bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { | 27 | bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); } |
30 | return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); | ||
31 | } | ||
32 | # endif | 28 | # endif |
33 | 29 | ||
34 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 30 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
35 | # endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS) | 31 | # endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS) |
36 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED | 32 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED |
diff --git a/quantum/led_matrix_animations/solid_reactive_simple_anim.h b/quantum/led_matrix_animations/solid_reactive_simple_anim.h index e1166a4fb..30e2527f6 100644 --- a/quantum/led_matrix_animations/solid_reactive_simple_anim.h +++ b/quantum/led_matrix_animations/solid_reactive_simple_anim.h | |||
@@ -3,14 +3,10 @@ | |||
3 | LED_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) | 3 | LED_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) |
4 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | 4 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS |
5 | 5 | ||
6 | static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { | 6 | static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { return scale8(255 - offset, val); } |
7 | return scale8(255 - offset, val); | ||
8 | } | ||
9 | 7 | ||
10 | bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { | 8 | bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); } |
11 | return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); | ||
12 | } | ||
13 | 9 | ||
14 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 10 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
15 | # endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE | 11 | # endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE |
16 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED | 12 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED |
diff --git a/quantum/led_matrix_animations/solid_reactive_wide.h b/quantum/led_matrix_animations/solid_reactive_wide.h index 4bcaba331..34a230c25 100644 --- a/quantum/led_matrix_animations/solid_reactive_wide.h +++ b/quantum/led_matrix_animations/solid_reactive_wide.h | |||
@@ -18,17 +18,13 @@ static uint8_t SOLID_REACTIVE_WIDE_math(uint8_t val, int16_t dx, int16_t dy, uin | |||
18 | } | 18 | } |
19 | 19 | ||
20 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE | 20 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE |
21 | bool SOLID_REACTIVE_WIDE(effect_params_t* params) { | 21 | bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); } |
22 | return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); | ||
23 | } | ||
24 | # endif | 22 | # endif |
25 | 23 | ||
26 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE | 24 | # ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE |
27 | bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { | 25 | bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); } |
28 | return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); | ||
29 | } | ||
30 | # endif | 26 | # endif |
31 | 27 | ||
32 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 28 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
33 | # endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE) | 29 | # endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE) |
34 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED | 30 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED |
diff --git a/quantum/led_matrix_animations/solid_splash_anim.h b/quantum/led_matrix_animations/solid_splash_anim.h index 3e9046640..4f6ba3d34 100644 --- a/quantum/led_matrix_animations/solid_splash_anim.h +++ b/quantum/led_matrix_animations/solid_splash_anim.h | |||
@@ -18,17 +18,13 @@ uint8_t SOLID_SPLASH_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uin | |||
18 | } | 18 | } |
19 | 19 | ||
20 | # ifndef DISABLE_LED_MATRIX_SOLID_SPLASH | 20 | # ifndef DISABLE_LED_MATRIX_SOLID_SPLASH |
21 | bool SOLID_SPLASH(effect_params_t* params) { | 21 | bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); } |
22 | return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); | ||
23 | } | ||
24 | # endif | 22 | # endif |
25 | 23 | ||
26 | # ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH | 24 | # ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH |
27 | bool SOLID_MULTISPLASH(effect_params_t* params) { | 25 | bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); } |
28 | return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); | ||
29 | } | ||
30 | # endif | 26 | # endif |
31 | 27 | ||
32 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 28 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
33 | # endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH) | 29 | # endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH) |
34 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED | 30 | #endif // LED_MATRIX_KEYREACTIVE_ENABLED |
diff --git a/quantum/led_matrix_animations/wave_left_right_anim.h b/quantum/led_matrix_animations/wave_left_right_anim.h index d547c72ce..736f22ddc 100644 --- a/quantum/led_matrix_animations/wave_left_right_anim.h +++ b/quantum/led_matrix_animations/wave_left_right_anim.h | |||
@@ -2,13 +2,9 @@ | |||
2 | LED_MATRIX_EFFECT(WAVE_LEFT_RIGHT) | 2 | LED_MATRIX_EFFECT(WAVE_LEFT_RIGHT) |
3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | 3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS |
4 | 4 | ||
5 | static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { | 5 | static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].x - time), val); } |
6 | return scale8(sin8(g_led_config.point[i].x - time), val); | ||
7 | } | ||
8 | 6 | ||
9 | bool WAVE_LEFT_RIGHT(effect_params_t* params) { | 7 | bool WAVE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); } |
10 | return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); | ||
11 | } | ||
12 | 8 | ||
13 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 9 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
14 | #endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT | 10 | #endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT |
diff --git a/quantum/led_matrix_animations/wave_up_down_anim.h b/quantum/led_matrix_animations/wave_up_down_anim.h index b68ff9bbc..3cab0597d 100644 --- a/quantum/led_matrix_animations/wave_up_down_anim.h +++ b/quantum/led_matrix_animations/wave_up_down_anim.h | |||
@@ -2,13 +2,9 @@ | |||
2 | LED_MATRIX_EFFECT(WAVE_UP_DOWN) | 2 | LED_MATRIX_EFFECT(WAVE_UP_DOWN) |
3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS | 3 | # ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS |
4 | 4 | ||
5 | static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { | 5 | static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].y - time), val); } |
6 | return scale8(sin8(g_led_config.point[i].y - time), val); | ||
7 | } | ||
8 | 6 | ||
9 | bool WAVE_UP_DOWN(effect_params_t* params) { | 7 | bool WAVE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &WAVE_UP_DOWN_math); } |
10 | return effect_runner_i(params, &WAVE_UP_DOWN_math); | ||
11 | } | ||
12 | 8 | ||
13 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS | 9 | # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS |
14 | #endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN | 10 | #endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN |
diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c index f3d4bc896..1d46b2c50 100644 --- a/quantum/led_matrix_drivers.c +++ b/quantum/led_matrix_drivers.c | |||
@@ -145,7 +145,7 @@ const led_matrix_driver_t led_matrix_driver = { | |||
145 | .set_value = IS31FL3731_set_value, | 145 | .set_value = IS31FL3731_set_value, |
146 | .set_value_all = IS31FL3731_set_value_all, | 146 | .set_value_all = IS31FL3731_set_value_all, |
147 | # else | 147 | # else |
148 | .set_value = IS31FL3733_set_value, | 148 | .set_value = IS31FL3733_set_value, |
149 | .set_value_all = IS31FL3733_set_value_all, | 149 | .set_value_all = IS31FL3733_set_value_all, |
150 | # endif | 150 | # endif |
151 | }; | 151 | }; |
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 26021598a..316c20fce 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h | |||
@@ -760,12 +760,12 @@ enum quantum_keycodes { | |||
760 | #define CMD_T(kc) LCMD_T(kc) | 760 | #define CMD_T(kc) LCMD_T(kc) |
761 | #define WIN_T(kc) LWIN_T(kc) | 761 | #define WIN_T(kc) LWIN_T(kc) |
762 | 762 | ||
763 | #define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Left Control + Shift e.g. for gnome-terminal | 763 | #define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Left Control + Shift e.g. for gnome-terminal |
764 | #define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include GUI, so just Left Control + Shift + Alt | 764 | #define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include GUI, so just Left Control + Shift + Alt |
765 | #define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI | 765 | #define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI |
766 | #define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI | 766 | #define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI |
767 | #define HYPR_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ | 767 | #define HYPR_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ |
768 | #define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI | 768 | #define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI |
769 | #define SCMD_T(kc) SGUI_T(kc) | 769 | #define SCMD_T(kc) SGUI_T(kc) |
770 | #define SWIN_T(kc) SGUI_T(kc) | 770 | #define SWIN_T(kc) SGUI_T(kc) |
771 | #define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt | 771 | #define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt |
@@ -792,7 +792,7 @@ enum quantum_keycodes { | |||
792 | 792 | ||
793 | #define UC_M_MA UNICODE_MODE_MAC | 793 | #define UC_M_MA UNICODE_MODE_MAC |
794 | #define UNICODE_MODE_OSX UNICODE_MODE_MAC // Deprecated alias | 794 | #define UNICODE_MODE_OSX UNICODE_MODE_MAC // Deprecated alias |
795 | #define UC_M_OS UNICODE_MODE_MAC // Deprecated alias | 795 | #define UC_M_OS UNICODE_MODE_MAC // Deprecated alias |
796 | #define UC_M_LN UNICODE_MODE_LNX | 796 | #define UC_M_LN UNICODE_MODE_LNX |
797 | #define UC_M_WI UNICODE_MODE_WIN | 797 | #define UC_M_WI UNICODE_MODE_WIN |
798 | #define UC_M_BS UNICODE_MODE_BSD | 798 | #define UC_M_BS UNICODE_MODE_BSD |
diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index a4db86d19..896fa6d0e 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c | |||
@@ -146,9 +146,9 @@ static void flush(void) { | |||
146 | } | 146 | } |
147 | 147 | ||
148 | const rgb_matrix_driver_t rgb_matrix_driver = { | 148 | const rgb_matrix_driver_t rgb_matrix_driver = { |
149 | .init = init, | 149 | .init = init, |
150 | .flush = flush, | 150 | .flush = flush, |
151 | .set_color = IS31FL3733_set_color, | 151 | .set_color = IS31FL3733_set_color, |
152 | .set_color_all = IS31FL3733_set_color_all, | 152 | .set_color_all = IS31FL3733_set_color_all, |
153 | }; | 153 | }; |
154 | # elif defined(IS31FL3737) | 154 | # elif defined(IS31FL3737) |
diff --git a/quantum/rgblight.c b/quantum/rgblight.c index e4c4d555e..baa10ec41 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c | |||
@@ -727,13 +727,11 @@ static uint16_t _repeat_timer; | |||
727 | static uint8_t _times_remaining; | 727 | static uint8_t _times_remaining; |
728 | static uint16_t _dur; | 728 | static uint16_t _dur; |
729 | 729 | ||
730 | void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) { | 730 | void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) { rgblight_blink_layer_repeat(layer, duration_ms, 1); } |
731 | rgblight_blink_layer_repeat(layer, duration_ms, 1); | ||
732 | } | ||
733 | 731 | ||
734 | void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) { | 732 | void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) { |
735 | _times_remaining = times * 2; | 733 | _times_remaining = times * 2; |
736 | _dur = duration_ms; | 734 | _dur = duration_ms; |
737 | 735 | ||
738 | rgblight_set_layer_state(layer, true); | 736 | rgblight_set_layer_state(layer, true); |
739 | _times_remaining--; | 737 | _times_remaining--; |
@@ -892,7 +890,7 @@ void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) { | |||
892 | animation_status.restart = true; | 890 | animation_status.restart = true; |
893 | } | 891 | } |
894 | # endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */ | 892 | # endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */ |
895 | # endif /* RGBLIGHT_USE_TIMER */ | 893 | # endif /* RGBLIGHT_USE_TIMER */ |
896 | } | 894 | } |
897 | #endif /* RGBLIGHT_SPLIT */ | 895 | #endif /* RGBLIGHT_SPLIT */ |
898 | 896 | ||
diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index bf942c526..9ed0f7591 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c | |||
@@ -240,38 +240,38 @@ typedef struct _Serial_s2m_buffer_t { | |||
240 | matrix_row_t smatrix[ROWS_PER_HAND]; | 240 | matrix_row_t smatrix[ROWS_PER_HAND]; |
241 | 241 | ||
242 | # ifdef ENCODER_ENABLE | 242 | # ifdef ENCODER_ENABLE |
243 | uint8_t encoder_state[NUMBER_OF_ENCODERS]; | 243 | uint8_t encoder_state[NUMBER_OF_ENCODERS]; |
244 | # endif | 244 | # endif |
245 | 245 | ||
246 | } Serial_s2m_buffer_t; | 246 | } Serial_s2m_buffer_t; |
247 | 247 | ||
248 | typedef struct _Serial_m2s_buffer_t { | 248 | typedef struct _Serial_m2s_buffer_t { |
249 | # ifdef SPLIT_MODS_ENABLE | 249 | # ifdef SPLIT_MODS_ENABLE |
250 | uint8_t real_mods; | 250 | uint8_t real_mods; |
251 | uint8_t weak_mods; | 251 | uint8_t weak_mods; |
252 | # ifndef NO_ACTION_ONESHOT | 252 | # ifndef NO_ACTION_ONESHOT |
253 | uint8_t oneshot_mods; | 253 | uint8_t oneshot_mods; |
254 | # endif | 254 | # endif |
255 | # endif | 255 | # endif |
256 | # ifndef DISABLE_SYNC_TIMER | 256 | # ifndef DISABLE_SYNC_TIMER |
257 | uint32_t sync_timer; | 257 | uint32_t sync_timer; |
258 | # endif | 258 | # endif |
259 | # ifdef SPLIT_TRANSPORT_MIRROR | 259 | # ifdef SPLIT_TRANSPORT_MIRROR |
260 | matrix_row_t mmatrix[ROWS_PER_HAND]; | 260 | matrix_row_t mmatrix[ROWS_PER_HAND]; |
261 | # endif | 261 | # endif |
262 | # ifdef BACKLIGHT_ENABLE | 262 | # ifdef BACKLIGHT_ENABLE |
263 | uint8_t backlight_level; | 263 | uint8_t backlight_level; |
264 | # endif | 264 | # endif |
265 | # ifdef WPM_ENABLE | 265 | # ifdef WPM_ENABLE |
266 | uint8_t current_wpm; | 266 | uint8_t current_wpm; |
267 | # endif | 267 | # endif |
268 | # if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) | 268 | # if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) |
269 | led_eeconfig_t led_matrix; | 269 | led_eeconfig_t led_matrix; |
270 | bool led_suspend_state; | 270 | bool led_suspend_state; |
271 | # endif | 271 | # endif |
272 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) | 272 | # if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) |
273 | rgb_config_t rgb_matrix; | 273 | rgb_config_t rgb_matrix; |
274 | bool rgb_suspend_state; | 274 | bool rgb_suspend_state; |
275 | # endif | 275 | # endif |
276 | } Serial_m2s_buffer_t; | 276 | } Serial_m2s_buffer_t; |
277 | 277 | ||
@@ -363,7 +363,7 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) | |||
363 | 363 | ||
364 | // TODO: if MATRIX_COLS > 8 change to unpack() | 364 | // TODO: if MATRIX_COLS > 8 change to unpack() |
365 | for (int i = 0; i < ROWS_PER_HAND; ++i) { | 365 | for (int i = 0; i < ROWS_PER_HAND; ++i) { |
366 | slave_matrix[i] = serial_s2m_buffer.smatrix[i]; | 366 | slave_matrix[i] = serial_s2m_buffer.smatrix[i]; |
367 | # ifdef SPLIT_TRANSPORT_MIRROR | 367 | # ifdef SPLIT_TRANSPORT_MIRROR |
368 | serial_m2s_buffer.mmatrix[i] = master_matrix[i]; | 368 | serial_m2s_buffer.mmatrix[i] = master_matrix[i]; |
369 | # endif | 369 | # endif |
@@ -380,14 +380,14 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) | |||
380 | 380 | ||
381 | # ifdef WPM_ENABLE | 381 | # ifdef WPM_ENABLE |
382 | // Write wpm to slave | 382 | // Write wpm to slave |
383 | serial_m2s_buffer.current_wpm = get_current_wpm(); | 383 | serial_m2s_buffer.current_wpm = get_current_wpm(); |
384 | # endif | 384 | # endif |
385 | 385 | ||
386 | # ifdef SPLIT_MODS_ENABLE | 386 | # ifdef SPLIT_MODS_ENABLE |
387 | serial_m2s_buffer.real_mods = get_mods(); | 387 | serial_m2s_buffer.real_mods = get_mods(); |
388 | serial_m2s_buffer.weak_mods = get_weak_mods(); | 388 | serial_m2s_buffer.weak_mods = get_weak_mods(); |
389 | # ifndef NO_ACTION_ONESHOT | 389 | # ifndef NO_ACTION_ONESHOT |
390 | serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); | 390 | serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); |
391 | # endif | 391 | # endif |
392 | # endif | 392 | # endif |
393 | 393 | ||
@@ -401,7 +401,7 @@ bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) | |||
401 | # endif | 401 | # endif |
402 | 402 | ||
403 | # ifndef DISABLE_SYNC_TIMER | 403 | # ifndef DISABLE_SYNC_TIMER |
404 | serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; | 404 | serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; |
405 | # endif | 405 | # endif |
406 | return true; | 406 | return true; |
407 | } | 407 | } |
@@ -416,7 +416,7 @@ void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) | |||
416 | for (int i = 0; i < ROWS_PER_HAND; ++i) { | 416 | for (int i = 0; i < ROWS_PER_HAND; ++i) { |
417 | serial_s2m_buffer.smatrix[i] = slave_matrix[i]; | 417 | serial_s2m_buffer.smatrix[i] = slave_matrix[i]; |
418 | # ifdef SPLIT_TRANSPORT_MIRROR | 418 | # ifdef SPLIT_TRANSPORT_MIRROR |
419 | master_matrix[i] = serial_m2s_buffer.mmatrix[i]; | 419 | master_matrix[i] = serial_m2s_buffer.mmatrix[i]; |
420 | # endif | 420 | # endif |
421 | } | 421 | } |
422 | # ifdef BACKLIGHT_ENABLE | 422 | # ifdef BACKLIGHT_ENABLE |