summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-09-19 18:35:02 +0000
committerQMK Bot <hello@qmk.fm>2022-09-19 18:35:02 +0000
commit731000533f7f88b2ca4ff7e25ce52d88a5531e46 (patch)
tree5b0665b4d64b420846ccfecaa06ace7432ab9cab
parent613e3f68b50b39428176af7d790e12994ff4c5fd (diff)
parent652d1d8a6d0a98ab2cff285dc46b91b702adedc6 (diff)
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--quantum/rgb_matrix/animations/typing_heatmap_anim.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/quantum/rgb_matrix/animations/typing_heatmap_anim.h b/quantum/rgb_matrix/animations/typing_heatmap_anim.h
index a05c07760e..00d137f1a6 100644
--- a/quantum/rgb_matrix/animations/typing_heatmap_anim.h
+++ b/quantum/rgb_matrix/animations/typing_heatmap_anim.h
@@ -29,7 +29,7 @@ void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) {
if (i_row == row && i_col == col) {
g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32);
} else {
-# define LED_DISTANCE(led_a, led_b) sqrt16(((int8_t)(led_a.x - led_b.x) * (int8_t)(led_a.x - led_b.x)) + ((int8_t)(led_a.y - led_b.y) * (int8_t)(led_a.y - led_b.y)))
+# 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]]);
# undef LED_DISTANCE
if (distance <= RGB_MATRIX_TYPING_HEATMAP_SPREAD) {