1
0
Fork 0

Change DRIVER_LED_COUNT to {LED,RGB}_MATRIX_LED_COUNT (#18399)

This commit is contained in:
Ryan 2022-09-23 22:46:23 +10:00 committed by GitHub
parent d967de0df7
commit 36c410592d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
577 changed files with 836 additions and 831 deletions

View file

@ -21,7 +21,7 @@
#include "print.h"
#include "quantum.h"
const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* https://cdn-learn.adafruit.com/downloads/pdf/adafruit-15x7-7x15-charlieplex-led-matrix-charliewing-featherwing.pdf
*/
@ -90,7 +90,7 @@ uint8_t terrazzo_effect = 1;
void terrazzo_set_pixel(uint8_t x, uint8_t y, uint8_t value) {
uint8_t target = y * LED_MATRIX_COLS + x;
if (target < DRIVER_LED_TOTAL && target >= 0) {
if (target < LED_MATRIX_LED_COUNT && target >= 0) {
led_matrix_set_value(y * LED_MATRIX_COLS + x, value);
}
}
@ -117,10 +117,10 @@ void terrazzo_scroll_pixel(bool clockwise) {
terrazzo_led_index = terrazzo_led_index - 1;
}
if (terrazzo_led_index >= DRIVER_LED_TOTAL) {
if (terrazzo_led_index >= LED_MATRIX_LED_COUNT) {
terrazzo_led_index = 0;
} else if (terrazzo_led_index <= 0 ) {
terrazzo_led_index = DRIVER_LED_TOTAL - 1;
terrazzo_led_index = LED_MATRIX_LED_COUNT - 1;
}
}