diff options
author | Johannes Choo <jhanschoo@gmail.com> | 2021-07-17 00:37:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 09:37:18 -0700 |
commit | 10d7eca5af736228fcd1de834eb0d922bec3c8b0 (patch) | |
tree | 56dc673f6d90a4dd6fb0b5f8130e5c75398b2f2f /quantum | |
parent | 4066662bdf88f2f95b17f4aa950417d97f6210e1 (diff) | |
download | qmk_firmware-10d7eca5af736228fcd1de834eb0d922bec3c8b0.tar.gz qmk_firmware-10d7eca5af736228fcd1de834eb0d922bec3c8b0.zip |
Fix LED Hit Counter for LED/RGB Matrix (#12674)
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/led_matrix/led_matrix.c | 2 | ||||
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 32788866c..fe7f1f039 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c | |||
@@ -219,7 +219,7 @@ void process_led_matrix(uint8_t row, uint8_t col, bool pressed) { | |||
219 | memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); | 219 | memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); |
220 | memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit | 220 | memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit |
221 | memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); | 221 | memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); |
222 | last_hit_buffer.count--; | 222 | last_hit_buffer.count = LED_HITS_TO_REMEMBER - led_count; |
223 | } | 223 | } |
224 | 224 | ||
225 | for (uint8_t i = 0; i < led_count; i++) { | 225 | for (uint8_t i = 0; i < led_count; i++) { |
diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 789cd2860..624e85158 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c | |||
@@ -230,7 +230,7 @@ void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) { | |||
230 | memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); | 230 | memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); |
231 | memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit | 231 | memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit |
232 | memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); | 232 | memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); |
233 | last_hit_buffer.count--; | 233 | last_hit_buffer.count = LED_HITS_TO_REMEMBER - led_count; |
234 | } | 234 | } |
235 | 235 | ||
236 | for (uint8_t i = 0; i < led_count; i++) { | 236 | for (uint8_t i = 0; i < led_count; i++) { |