Skip to content

Commit dcdc729

Browse files
authored
RGB Matrix Heatmap - Skip positions with NO_LED (#17488)
1 parent f7eb792 commit dcdc729

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

quantum/rgb_matrix/animations/typing_heatmap_anim.h

+6
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,14 @@ void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) {
1818
// Limit effect to pressed keys
1919
g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32);
2020
# else
21+
if (g_led_config.matrix_co[row][col] == NO_LED) { // skip as pressed key doesn't have an led position
22+
return;
23+
}
2124
for (uint8_t i_row = 0; i_row < MATRIX_ROWS; i_row++) {
2225
for (uint8_t i_col = 0; i_col < MATRIX_COLS; i_col++) {
26+
if (g_led_config.matrix_co[i_row][i_col] == NO_LED) { // skip as target key doesn't have an led position
27+
continue;
28+
}
2329
if (i_row == row && i_col == col) {
2430
g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32);
2531
} else {

0 commit comments

Comments
 (0)