Skip to content

Commit

Permalink
Fix LED Hit Counter for LED/RGB Matrix (qmk#12674)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhanschoo authored and nhongooi committed Dec 5, 2021
1 parent 43a557d commit dabea86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion quantum/led_matrix/led_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void process_led_matrix(uint8_t row, uint8_t col, bool pressed) {
memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count);
memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit
memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count);
last_hit_buffer.count--;
last_hit_buffer.count = LED_HITS_TO_REMEMBER - led_count;
}

for (uint8_t i = 0; i < led_count; i++) {
Expand Down
2 changes: 1 addition & 1 deletion quantum/rgb_matrix/rgb_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) {
memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count);
memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit
memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count);
last_hit_buffer.count--;
last_hit_buffer.count = LED_HITS_TO_REMEMBER - led_count;
}

for (uint8_t i = 0; i < led_count; i++) {
Expand Down

0 comments on commit dabea86

Please sign in to comment.