Merge pull request #7 from keyboardio/f/get-led-index

Add a `get_led_index` function
pull/365/head
Jesse Vincent 7 years ago committed by GitHub
commit 915e7068f6

@ -82,6 +82,10 @@ void Model01::led_set_crgb_at(byte row, byte col, cRGB color) {
led_set_crgb_at(key_led_map[row][col], color);
}
uint8_t Model01::get_led_index(byte row, byte col) {
return key_led_map[row][col];
}
cRGB Model01::led_get_crgb_at(uint8_t i) {
if(i<32) {
return leftHand.ledData.leds[i];

@ -18,6 +18,7 @@ class Model01 {
void led_set_crgb_at(uint8_t i, cRGB crgb);
cRGB led_get_crgb_at(uint8_t i);
cRGB get_key_color(byte row, byte col);
uint8_t get_led_index(byte row, byte col);
void scan_matrix(void);
void read_matrix(void);

Loading…
Cancel
Save