From 500385f2183e994fccebb8b7ca8b73ff994528e4 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 22 Jan 2016 19:30:22 -0800 Subject: [PATCH] Remove a useless layer of indirection --- led_control.cpp | 8 ++------ led_control.h | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/led_control.cpp b/led_control.cpp index e3ba3b26..13ae5d86 100644 --- a/led_control.cpp +++ b/led_control.cpp @@ -68,16 +68,12 @@ void setup_leds() { LED.setColorOrderGRB(); // Uncomment for RGB color order } -byte key_to_led(byte row, byte col) { - return key_led_map[row][col]; -} - void set_key_color(byte row, byte col, cRGB color) { - LED.set_crgb_at(key_to_led(row, col), color); + LED.set_crgb_at(key_led_map[row][col], color); } cRGB get_key_color(byte row, byte col) { - return LED.get_crgb_at(key_to_led(row, col)); + return LED.get_crgb_at(key_led_map[row][col]); } diff --git a/led_control.h b/led_control.h index 83c16efd..7e9a556f 100644 --- a/led_control.h +++ b/led_control.h @@ -98,7 +98,6 @@ void set_all_leds_to(cRGB color); void set_led_mode(int mode); void next_led_mode(); -byte key_to_led(byte row, byte col); void set_key_color(byte row, byte col, cRGB color); cRGB get_key_color(byte row, byte col);