[Core] Optimisation - Add RGB LED colour set check in drivers (#21134)

This commit is contained in:
Xelus22 2023-06-08 11:58:53 +10:00 committed by GitHub
parent 9a6056d09c
commit d1d0925cf9
Failed to generate hash of commit
12 changed files with 41 additions and 1 deletions

View file

@ -151,6 +151,9 @@ void CKLED2001_set_value(int index, uint8_t value) {
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
if (g_pwm_buffer[led.driver][led.v] == value) {
return;
}
g_pwm_buffer[led.driver][led.v] = value;
g_pwm_buffer_update_required[led.driver] = true;
}