LEDPaletteTheme: Fix the key address refreshAt() uses

In `refreshAt()`, we want to use the key address, instead of the LED address.
`LEDControl` will turn the key address into a LED address itself anyway. This
not only makes the code a tiny bit more efficient, but it also fixes
`refreshAt()`, which was refreshing the wrong key since the conversion to
`KeyAddr`.

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/675/head
Gergely Nagy 5 years ago
parent a050223d40
commit 47053c9a7e
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -51,7 +51,7 @@ void LEDPaletteTheme::refreshAt(uint16_t theme_base, uint8_t theme, KeyAddr key_
uint8_t pos = KeyboardHardware.getLedIndex(key_addr);
cRGB color = lookupColorAtPosition(map_base, pos);
::LEDControl.setCrgbAt(KeyAddr(pos), color);
::LEDControl.setCrgbAt(key_addr, color);
}

Loading…
Cancel
Save