Merge remote-tracking branch 'qmk/master' into merge-2023-06-03

This commit is contained in:
Ilya Zhuravlev
2023-06-03 12:35:25 -06:00
14389 changed files with 536595 additions and 476101 deletions

View File

@ -2,6 +2,9 @@
#define RGB_MATRIX_EFFECT_TYPING_HEATMAP
RGB_MATRIX_EFFECT(TYPING_HEATMAP)
# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
# ifndef RGB_MATRIX_TYPING_HEATMAP_INCREASE_STEP
# define RGB_MATRIX_TYPING_HEATMAP_INCREASE_STEP 32
# endif
# ifndef RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS
# define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 25
@ -17,7 +20,7 @@ RGB_MATRIX_EFFECT(TYPING_HEATMAP)
void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) {
# ifdef RGB_MATRIX_TYPING_HEATMAP_SLIM
// Limit effect to pressed keys
g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32);
g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], RGB_MATRIX_TYPING_HEATMAP_INCREASE_STEP);
# else
if (g_led_config.matrix_co[row][col] == NO_LED) { // skip as pressed key doesn't have an led position
return;
@ -28,7 +31,7 @@ void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) {
continue;
}
if (i_row == row && i_col == col) {
g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32);
g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], RGB_MATRIX_TYPING_HEATMAP_INCREASE_STEP);
} else {
# define LED_DISTANCE(led_a, led_b) sqrt16(((int16_t)(led_a.x - led_b.x) * (int16_t)(led_a.x - led_b.x)) + ((int16_t)(led_a.y - led_b.y) * (int16_t)(led_a.y - led_b.y)))
uint8_t distance = LED_DISTANCE(g_led_config.point[g_led_config.matrix_co[row][col]], g_led_config.point[g_led_config.matrix_co[i_row][i_col]]);