1
0
Fork 0

[keyboard] annepro2 Add and use functions to directly control led colors (#17196)

This commit is contained in:
zv0n 2022-06-10 05:25:48 +02:00 committed by GitHub
parent 9316023290
commit 9da1b86d71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 5 deletions

View file

@ -36,11 +36,11 @@ void init(void) {
void flush(void) {}
void set_color(int index, uint8_t r, uint8_t g, uint8_t b) {
if (r != led_mask[led_pos[index]].p.red ||
g != led_mask[led_pos[index]].p.green ||
b != led_mask[led_pos[index]].p.blue)
if (r != led_colors[led_pos[index]].p.red ||
g != led_colors[led_pos[index]].p.green ||
b != led_colors[led_pos[index]].p.blue)
{
led_mask[led_pos[index]] = (ap2_led_t){
led_colors[led_pos[index]] = (ap2_led_t){
.p.blue = b,
.p.red = r,
.p.green = g,